[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vc-got eacbf76 065/145: don't hardcode got questions
From: |
ELPA Syncer |
Subject: |
[elpa] externals/vc-got eacbf76 065/145: don't hardcode got questions |
Date: |
Thu, 9 Sep 2021 15:58:34 -0400 (EDT) |
branch: externals/vc-got
commit eacbf767c64ccb8c469698044c691c7baa3b20a4
Author: Omar Polo <op@omarpolo.com>
Commit: Omar Polo <op@omarpolo.com>
don't hardcode got questions
match and relay them to the user
---
vc-got-stage.el | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/vc-got-stage.el b/vc-got-stage.el
index baf0e43..489c18f 100644
--- a/vc-got-stage.el
+++ b/vc-got-stage.el
@@ -25,6 +25,7 @@
;;; Code:
+(require 'rx)
(require 'vc)
(defvar vc-got-program) ;vc-got.el
@@ -86,11 +87,12 @@ PROC is the process, STRING part of its output."
(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)))))))))
- [elpa] externals/vc-got a5c1731 047/145: drop vc-got-stage, (continued)
- [elpa] externals/vc-got a5c1731 047/145: drop vc-got-stage, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 8da4c01 049/145: remove debugging comments, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 3f25d9f 051/145: add vc-got-annotate (#4), ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 8228942 050/145: fix vc-got-dir-status-files, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got fab791a 052/145: vc-got--call flatten and filter arg list, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 8b635a9 054/145: implement repository-url, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got c27df03 055/145: print more info in vc-got-dir-extra-headers, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got a96df0e 056/145: provide unregister and delete-file commands (#7), ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 3d2d3c3 059/145: drop vc-got-unregister, not used, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got c819459 077/145: trap c-g during stage operation, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got eacbf76 065/145: don't hardcode got questions,
ELPA Syncer <=
- [elpa] externals/vc-got 2d83de2 074/145: implement vc-got-dir-printer, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 43c93a8 063/145: typo, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 6eea6cf 075/145: drop unnecessary `:group's directive in defcustom, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 8ed796d 062/145: vc-got-dir-status-files: show changes in subdirs, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got ffa81a1 067/145: typo, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 6b6c8a7 064/145: fundamentals for staging changes, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 93562d9 073/145: fix default directory during stage operation, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 67332ba 076/145: docs fixes, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 5b4a6b9 069/145: more docs, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got a323f60 071/145: show list of files when committing staged stuff, ELPA Syncer, 2021/09/09