comparison lisp/isearch.el @ 2857:00029a6ad94c

(isearch-mode-map): Extend the dense keymap to 256 chars.
author Richard M. Stallman <rms@gnu.org>
date Tue, 18 May 1993 15:46:30 +0000
parents 29d41032d9fd
children debc28aaae2c
comparison
equal deleted inserted replaced
2856:794899b97115 2857:00029a6ad94c
2 2
3 ;; Copyright (C) 1992 Free Software Foundation, Inc. 3 ;; Copyright (C) 1992 Free Software Foundation, Inc.
4 4
5 ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu> 5 ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>
6 6
7 ;; |$Date: 1993/05/15 20:05:36 $|$Revision: 1.33 $ 7 ;; |$Date: 1993/05/17 18:22:37 $|$Revision: 1.34 $
8 8
9 ;; This file is not yet part of GNU Emacs, but it is based almost 9 ;; This file is not yet part of GNU Emacs, but it is based almost
10 ;; entirely on isearch.el which is part of GNU Emacs. 10 ;; entirely on isearch.el which is part of GNU Emacs.
11 11
12 ;; GNU Emacs is distributed in the hope that it will be useful, 12 ;; GNU Emacs is distributed in the hope that it will be useful,
90 ;;; Change Log: 90 ;;; Change Log:
91 91
92 ;;;==================================================================== 92 ;;;====================================================================
93 ;;; Change History 93 ;;; Change History
94 94
95 ;;; $Header: /home/fsf/rms/e19/lisp/RCS/isearch.el,v 1.33 1993/05/15 20:05:36 rms Exp rms $ 95 ;;; $Header: /home/fsf/rms/e19/lisp/RCS/isearch.el,v 1.34 1993/05/17 18:22:37 rms Exp rms $
96 ;;; $Log: isearch.el,v $ 96 ;;; $Log: isearch.el,v $
97 ; Revision 1.34 1993/05/17 18:22:37 rms
98 ; (isearch-mode): Set deactivate-mark.
99 ;
97 ; Revision 1.33 1993/05/15 20:05:36 rms 100 ; Revision 1.33 1993/05/15 20:05:36 rms
98 ; (isearch-done): Don't activate mark. 101 ; (isearch-done): Don't activate mark.
99 ; 102 ;
100 ; Revision 1.32 1993/05/14 18:02:55 rms 103 ; Revision 1.32 1993/05/14 18:02:55 rms
101 ; (isearch-mode-map): Handle any length vector in keymap. 104 ; (isearch-mode-map): Handle any length vector in keymap.
321 "Keymap for isearch-mode.") 324 "Keymap for isearch-mode.")
322 325
323 (or isearch-mode-map 326 (or isearch-mode-map
324 (let* ((i 0) 327 (let* ((i 0)
325 (map (make-keymap))) 328 (map (make-keymap)))
329 (or (vectorp (nth 1 map))
330 (error "The initialization of isearch-mode-map must be updated"))
331 ;; Give this map a vector 256 long, for dense binding
332 ;; of a larger range of ordinary characters.
333 (setcar (cdr map) (make-vector 256 nil))
326 334
327 ;; Make function keys, etc, exit the search. 335 ;; Make function keys, etc, exit the search.
328 (define-key map [t] 'isearch-other-control-char) 336 (define-key map [t] 'isearch-other-control-char)
329 ;; Control chars, by default, end isearch mode transparently. 337 ;; Control chars, by default, end isearch mode transparently.
330 ;; We need these explicit definitions because, in a dense keymap, 338 ;; We need these explicit definitions because, in a dense keymap,
334 (define-key map (make-string 1 i) 'isearch-other-control-char) 342 (define-key map (make-string 1 i) 'isearch-other-control-char)
335 (setq i (1+ i))) 343 (setq i (1+ i)))
336 344
337 ;; Printing chars extend the selection by default. 345 ;; Printing chars extend the selection by default.
338 (setq i ?\ ) 346 (setq i ?\ )
339 (or (vectorp (nth 1 map))
340 (error "The initialization of isearch-mode-map must be updated"))
341 (while (< i (length (nth 1 map))) 347 (while (< i (length (nth 1 map)))
342 (define-key map (make-string 1 i) 'isearch-printing-char) 348 (define-key map (make-string 1 i) 'isearch-printing-char)
343 (setq i (1+ i))) 349 (setq i (1+ i)))
344 350
345 ;; Several non-printing chars change the searching behavior. 351 ;; Several non-printing chars change the searching behavior.