changeset 10166:2cc7d710cf56

(isearch-mode-map): Move the code to set up the meta submap earlier in the expression.
author Richard M. Stallman <rms@gnu.org>
date Thu, 15 Dec 1994 02:06:45 +0000
parents 10a032873be6
children 358d48409854
files lisp/isearch.el
diffstat 1 files changed, 14 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/isearch.el	Thu Dec 15 02:02:04 1994 +0000
+++ b/lisp/isearch.el	Thu Dec 15 02:06:45 1994 +0000
@@ -4,7 +4,7 @@
 
 ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>
 
-;; |$Date: 94/11/15 19:41:36 $|$Revision: 1.78 $
+;; |$Date: 1994/12/05 19:34:52 $|$Revision: 1.79 $
 
 ;; This file is part of GNU Emacs.
 
@@ -204,11 +204,24 @@
 	(define-key map (vector i) 'isearch-printing-char)
 	(setq i (1+ i)))
 
+      ;; To handle local bindings with meta char prefix keys, define
+      ;; another full keymap.  This must be done for any other prefix
+      ;; keys as well, one full keymap per char of the prefix key.  It
+      ;; would be simpler to disable the global keymap, and/or have a
+      ;; default local key binding for any key not otherwise bound.
+      (let ((meta-map (make-sparse-keymap)))
+	(define-key map (char-to-string meta-prefix-char) meta-map)
+	(define-key map [escape] meta-map))
+      (define-key map (vector meta-prefix-char t) 'isearch-other-meta-char)
+
       ;; Several non-printing chars change the searching behavior.
       (define-key map "\C-s" 'isearch-repeat-forward)
       (define-key map "\C-r" 'isearch-repeat-backward)
       (define-key map "\177" 'isearch-delete-char)
       (define-key map "\C-g" 'isearch-abort)
+      ;; This assumes \e is the meta-prefix-char.
+      (or (= ?\e meta-prefix-char)
+	  (error "Inconsistency in isearch.el"))
       (define-key map "\e\e\e" 'isearch-cancel)
       (define-key map  [escape escape escape] 'isearch-cancel)
     
@@ -263,16 +276,6 @@
 ;;;      ;; Instead bind C-h to special help command for isearch-mode.
 ;;;      (define-key map "\C-h" 'isearch-mode-help)
 
-      ;; To handle local bindings with meta char prefix keys, define
-      ;; another full keymap.  This must be done for any other prefix
-      ;; keys as well, one full keymap per char of the prefix key.  It
-      ;; would be simpler to disable the global keymap, and/or have a
-      ;; default local key binding for any key not otherwise bound.
-      (let ((meta-map (make-sparse-keymap)))
-	(define-key map (char-to-string meta-prefix-char) meta-map)
-	(define-key map [escape] meta-map))
-      (define-key map (vector meta-prefix-char t) 'isearch-other-meta-char)
-
       (define-key map "\M-n" 'isearch-ring-advance)
       (define-key map "\M-p" 'isearch-ring-retreat)
       (define-key map "\M-y" 'isearch-yank-kill)