commit - 6b6c8a7882362c36787a7522e0b0cecc463f6e3d
commit + eacbf767c64ccb8c469698044c691c7baa3b20a4
blob - baf0e43679ec4f8185715c304432836c0872e230
blob + 489c18fc4d59070afd28ca6203d95e171895e97a
--- vc-got-stage.el
+++ vc-got-stage.el
;;; Code:
+(require 'rx)
(require 'vc)
(defvar vc-got-program) ;vc-got.el
(insert string)
(save-excursion
(beginning-of-line)
- (let ((msg (cond ((looking-at "^stage this change?")
- "Stage this change? ")
- ((looking-at "^stage this addition?")
- "Stage this addition? "))))
- (when msg
+ (when (looking-at (rx bol
+ (group (zero-or-one "un")
+ "stage"
+ (zero-or-more anychar)
+ "?")))
+ (let ((msg (match-string 1)))
(kill-line)
(process-send-string buf (if (y-or-n-p msg) "y\n" "n\n"))
(erase-buffer)))))))))