emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r112493: * lisp/eshell/em-hist.el (es


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112493: * lisp/eshell/em-hist.el (eshell-isearch-map): Initialize in the defvar.
Date: Tue, 07 May 2013 00:57:02 -0700
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 112493
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2013-05-07 00:57:02 -0700
message:
  * lisp/eshell/em-hist.el (eshell-isearch-map): Initialize in the defvar.
  Remove explicit eshell-isearch-cancel-map.
modified:
  lisp/ChangeLog
  lisp/eshell/em-hist.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-05-07 07:05:21 +0000
+++ b/lisp/ChangeLog    2013-05-07 07:57:02 +0000
@@ -1,5 +1,8 @@
 2013-05-07  Glenn Morris  <address@hidden>
 
+       * eshell/em-hist.el (eshell-isearch-map): Initialize in the defvar.
+       Remove explicit eshell-isearch-cancel-map.
+
        * progmodes/f90.el (f90-smart-end-names): New option.
        (f90-smart-end): Doc fix.
        (f90-end-block-optional-name): New constant.

=== modified file 'lisp/eshell/em-hist.el'
--- a/lisp/eshell/em-hist.el    2013-01-01 09:11:05 +0000
+++ b/lisp/eshell/em-hist.el    2013-05-07 07:57:02 +0000
@@ -189,21 +189,18 @@
 (defvar eshell-matching-input-from-input-string "")
 (defvar eshell-save-history-index nil)
 
-(defvar eshell-isearch-map nil)
-
-(unless eshell-isearch-map
-  (setq eshell-isearch-map (copy-keymap isearch-mode-map))
-  (define-key eshell-isearch-map [(control ?m)] 'eshell-isearch-return)
-  (define-key eshell-isearch-map [return] 'eshell-isearch-return)
-  (define-key eshell-isearch-map [(control ?r)] 
'eshell-isearch-repeat-backward)
-  (define-key eshell-isearch-map [(control ?s)] 'eshell-isearch-repeat-forward)
-  (define-key eshell-isearch-map [(control ?g)] 'eshell-isearch-abort)
-  (define-key eshell-isearch-map [backspace] 'eshell-isearch-delete-char)
-  (define-key eshell-isearch-map [delete] 'eshell-isearch-delete-char)
-  (defvar eshell-isearch-cancel-map)
-  (define-prefix-command 'eshell-isearch-cancel-map)
-  (define-key eshell-isearch-map [(control ?c)] 'eshell-isearch-cancel-map)
-  (define-key eshell-isearch-cancel-map [(control ?c)] 'eshell-isearch-cancel))
+(defvar eshell-isearch-map
+  (let ((map (copy-keymap isearch-mode-map)))
+    (define-key map [(control ?m)] 'eshell-isearch-return)
+    (define-key map [return] 'eshell-isearch-return)
+    (define-key map [(control ?r)] 'eshell-isearch-repeat-backward)
+    (define-key map [(control ?s)] 'eshell-isearch-repeat-forward)
+    (define-key map [(control ?g)] 'eshell-isearch-abort)
+    (define-key map [backspace] 'eshell-isearch-delete-char)
+    (define-key map [delete] 'eshell-isearch-delete-char)
+    (define-key map "\C-c\C-c" 'eshell-isearch-cancel)
+    map)
+  "Keymap used in isearch in Eshell.")
 
 (defvar eshell-rebind-keys-alist)
 


reply via email to

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