emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 0ed0cd4: [el-search] Key syntax cleanup


From: Michael Heerdegen
Subject: [elpa] master 0ed0cd4: [el-search] Key syntax cleanup
Date: Wed, 24 Apr 2019 04:19:37 -0400 (EDT)

branch: master
commit 0ed0cd47f8c823748da89226a5fae5ed71a6abaf
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>

    [el-search] Key syntax cleanup
    
    Only bind events that are generated or result of key translation in
    all environments; avoid binding events that are generated only in some
    environments (e.g. depending on 'window-system') and typically
    translated.
    Also bump version to 1.12.4.
    
    * packages/el-search/el-search.el (el-search-read-expression-map)
    (el-search-basic-transient-map, el-search-occur-mode-map-1): Clean up
    key syntax.
---
 packages/el-search/NEWS         | 17 +++++++++++++++++
 packages/el-search/el-search.el | 15 +++++----------
 2 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/packages/el-search/NEWS b/packages/el-search/NEWS
index ebf52af..e0fea03 100644
--- a/packages/el-search/NEWS
+++ b/packages/el-search/NEWS
@@ -1,6 +1,23 @@
 Some of the user visible news were:
 
 
+Version: 1.12.4
+
+  Key syntax cleanup: In some cases the code used to bind some keys
+  twice: it bound events E1 and E2 where in some environments hitting
+  a certain key generates E1 in in others E2 where E2 is normally
+  translated into E1.  For example, the code created bindings for
+  "\C-j" and also for [(meta return)], although binding only "\C-j"
+  would suffice because in environments where [(meta return)] is
+  created it would be immediately translated to "\C-j".
+
+  That means that should you add a binding for the event that is
+  generated only in some environments like [(meta return)] in the
+  respective key map you would get the effect that your binding
+  shadows the el-search binding in some environments and in others
+  not.  If you experience something like that, check your init file if
+  you do something like that.
+
 Version: 1.12.2
 
   Some changes to the 'el-search-query-replace' prompt to make it
diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index e7357d3..0e1c1e5 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -7,7 +7,7 @@
 ;; Created: 29 Jul 2015
 ;; Keywords: lisp
 ;; Compatibility: GNU Emacs 25
-;; Version: 1.12.3
+;; Version: 1.12.4
 ;; Package-Requires: ((emacs "25") (stream "2.2.4") (cl-print "1.0"))
 
 
@@ -659,11 +659,10 @@ whole match visible whenever possible."
 (defvar el-search-read-expression-map
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map read-expression-map)
-    (define-key map [(control ?g)] #'abort-recursive-edit)
+    (define-key map "\C-g" #'abort-recursive-edit)
     (define-key map [up]   nil)
     (define-key map [down] nil)
-    (define-key map [(control ?j)] #'newline)
-    (define-key map [(meta return)] #'el-search-set-occur-flag-exit-minibuffer)
+    (define-key map "\C-j" #'newline)
     (define-key map (kbd "M-RET")   #'el-search-set-occur-flag-exit-minibuffer)
     map)
   "Keymap for reading input with `el-search-read-expression'.")
@@ -2063,9 +2062,8 @@ Go back to the place where the search had been started."
 
 (defvar el-search-basic-transient-map
   (let ((map (make-sparse-keymap)))
-    (define-key map [return]       #'el-search-pause-search)
     (define-key map (kbd "RET")    #'el-search-pause-search)
-    (define-key map [(control ?g)] #'el-search-keyboard-quit)
+    (define-key map "\C-g"         #'el-search-keyboard-quit)
     (define-key map [??]           #'el-search-help-list-bindings)
     (define-key map `[,help-char]  el-search-help-map)
     (define-key map [help]         el-search-help-map)
@@ -3646,12 +3644,9 @@ Prompt for a new pattern and revert."
 
 (defvar el-search-occur-mode-map-1
   (let ((map (make-sparse-keymap)))
-    (define-key map [tab]           #'el-search-occur-tab-command)
     (define-key map "\t"            #'el-search-occur-tab-command)
-    (define-key map [return]        #'el-search-occur-jump-to-match)
     (define-key map "\r"            #'el-search-occur-jump-to-match)
-    (define-key map [S-iso-lefttab] #'el-search-occur-cycle)
-    (define-key map [(shift tab)]   #'el-search-occur-cycle)
+    (define-key map [backtab]       #'el-search-occur-cycle)
     (define-key map [?p]            #'el-search-occur-previous-match)
     (define-key map [?n]            #'el-search-occur-next-match)
     (define-key map [?r]            #'el-search-occur-previous-match)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]