aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-07-29 22:21:55 +0000
committerRichard M. Stallman1995-07-29 22:21:55 +0000
commit24b5caec3468a764a414e7b090ab86caa4df47f0 (patch)
tree9e3041517d5f6ef55ff447902a73643aed108c1e
parentb8313955da4d0a55660fdec0b64ddb24df2ba6a7 (diff)
downloademacs-24b5caec3468a764a414e7b090ab86caa4df47f0.tar.gz
emacs-24b5caec3468a764a414e7b090ab86caa4df47f0.zip
(isearch-mode-map): Don't bind tab, return, kp-N, etc.
(isearch-other-meta-char): Special handling for keys like tab, etc.
-rw-r--r--lisp/isearch.el46
1 files changed, 14 insertions, 32 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 300bc52296c..fca09b9decd 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -231,37 +231,6 @@ Default value, nil, means edit the string instead.")
231 (define-key map "\C-w" 'isearch-yank-word) 231 (define-key map "\C-w" 'isearch-yank-word)
232 (define-key map "\C-y" 'isearch-yank-line) 232 (define-key map "\C-y" 'isearch-yank-line)
233 233
234 ;; Bind the ASCII-equivalent "function keys" explicitly to nil
235 ;; so that the default binding does not apply.
236 ;; As a result, these keys translate thru function-key-map
237 ;; as normal, and they have the effect of the equivalent ASCII char.
238 ;; We bind [escape] below.
239 (define-key map [tab] 'nil)
240 (define-key map [kp-0] 'nil)
241 (define-key map [kp-1] 'nil)
242 (define-key map [kp-2] 'nil)
243 (define-key map [kp-3] 'nil)
244 (define-key map [kp-4] 'nil)
245 (define-key map [kp-5] 'nil)
246 (define-key map [kp-6] 'nil)
247 (define-key map [kp-7] 'nil)
248 (define-key map [kp-8] 'nil)
249 (define-key map [kp-9] 'nil)
250 (define-key map [kp-add] 'nil)
251 (define-key map [kp-subtract] 'nil)
252 (define-key map [kp-multiply] 'nil)
253 (define-key map [kp-divide] 'nil)
254 (define-key map [kp-decimal] 'nil)
255 (define-key map [kp-separator] 'nil)
256 (define-key map [kp-equal] 'nil)
257 (define-key map [kp-tab] 'nil)
258 (define-key map [kp-space] 'nil)
259 (define-key map [kp-enter] 'nil)
260 (define-key map [delete] 'nil)
261 (define-key map [backspace] 'nil)
262 (define-key map [return] 'nil)
263 (define-key map [newline] 'nil)
264
265 ;; Define keys for regexp chars * ? |. 234 ;; Define keys for regexp chars * ? |.
266 ;; Nothing special for + because it matches at least once. 235 ;; Nothing special for + because it matches at least once.
267 (define-key map "*" 'isearch-*-char) 236 (define-key map "*" 'isearch-*-char)
@@ -1037,7 +1006,20 @@ and the meta character is unread so that it applies to editing the string."
1037 (let* ((key (this-command-keys)) 1006 (let* ((key (this-command-keys))
1038 (main-event (aref key 0)) 1007 (main-event (aref key 0))
1039 (keylist (listify-key-sequence key))) 1008 (keylist (listify-key-sequence key)))
1040 (cond ( 1009 (cond ((and (= (length key) 1)
1010 (lookup-key function-key-map key))
1011 ;; Handle a function key that translates into something else.
1012 ;; If the key has a global definition too,
1013 ;; exit and unread the key itself, so its global definition runs.
1014 ;; Otherwise, unread the translation,
1015 ;; so that the translated key takes effect within isearch.
1016 (if (lookup-key global-map key)
1017 (progn
1018 (isearch-done)
1019 (apply 'isearch-unread keylist))
1020 (apply 'isearch-unread
1021 (listify-key-sequence (lookup-key function-key-map key)))))
1022 (
1041 ;; Handle an undefined shifted control character 1023 ;; Handle an undefined shifted control character
1042 ;; by downshifting it if that makes it defined. 1024 ;; by downshifting it if that makes it defined.
1043 ;; (As read-key-sequence would normally do, 1025 ;; (As read-key-sequence would normally do,