From f9980f63fdbbad0edd01264c3c39dacaa56a393c Mon Sep 17 00:00:00 2001 From: Michael Heerdegen Date: Thu, 17 Mar 2016 00:05:07 +0100 Subject: [PATCH] Replacing: make C-g an alternative key for quitting --- packages/el-search/el-search.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el index c7b349904..26857efdb 100644 --- a/packages/el-search/el-search.el +++ b/packages/el-search/el-search.el @@ -977,7 +977,7 @@ Hit any key to proceed." (funcall do-replace) (while (not (pcase (if replaced-this (read-char-choice "[SPC ! q] (? for help)" - '(?\ ?! ?q ?n ??)) + '(?\ ?! ?q ?\C-g ?n ??)) (read-char-choice (concat "Replace this occurrence" (if (or (string-match-p "\n" to-insert) @@ -986,7 +986,7 @@ Hit any key to proceed." "? " (if splice "{splice} " "") "[y SPC r ! s q] (? for help)" ) - '(?y ?n ?r ?\ ?! ?q ?s ??))) + '(?y ?n ?r ?\ ?! ?q ?\C-g ?s ??))) (?r (funcall do-replace) nil) (?y (funcall do-replace) @@ -1001,7 +1001,8 @@ Hit any key to proceed." (?s (cl-callf not splice) (setq to-insert (funcall get-replacement-string)) nil) - (?q (setq done t) + ((or ?q ?\C-g) + (setq done t) t) (?? (ignore (read-char el-search-search-and-replace-help-string)) nil))))) -- 2.39.2