Mercurial > emacs
comparison lisp/isearch.el @ 1557:816bfa185671
* isearch.el (isearch-frames-exist): This isn't what we want -
replaced by...
(isearch-gnu-emacs-events): non-nil if should expect events in the
style generated by GNU Emacs 19. Set if set-frame-height is
fboundp; this is true on any GNU Emacs 19, whether or not it was
compiled with multiple frame support.
(isearch-mode-map): Test isearch-gnu-emacs-events instead of
isearch-frames-exist to see if we should bind switch-frame events.
(isearch-update): Test isearch-gnu-emacs-events instead of
isearch-frames-exist to see if unread-command-char's quiescent
value is nil or -1.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sat, 07 Nov 1992 06:17:04 +0000 |
parents | dd292c7ef749 |
children | 567e76c81b0c |
comparison
equal
deleted
inserted
replaced
1556:fce86d06a758 | 1557:816bfa185671 |
---|---|
2 ;; Copyright (C) 1992 Free Software Foundation, Inc. | 2 ;; Copyright (C) 1992 Free Software Foundation, Inc. |
3 | 3 |
4 ;; LCD Archive Entry: | 4 ;; LCD Archive Entry: |
5 ;; isearch-mode|Daniel LaLiberte|liberte@cs.uiuc.edu | 5 ;; isearch-mode|Daniel LaLiberte|liberte@cs.uiuc.edu |
6 ;; |A minor mode replacement for isearch.el. | 6 ;; |A minor mode replacement for isearch.el. |
7 ;; |$Date: 1992/10/27 04:11:46 $|$Revision: 1.13 $|~/modes/isearch-mode.el | 7 ;; |$Date: 1992/11/01 22:10:59 $|$Revision: 1.14 $|~/modes/isearch-mode.el |
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, |
86 ;; - Hooks and options for failed search. | 86 ;; - Hooks and options for failed search. |
87 | 87 |
88 ;;;==================================================================== | 88 ;;;==================================================================== |
89 ;;; Change History | 89 ;;; Change History |
90 | 90 |
91 ;;; $Header: /gd/gnu/emacs/19.0/lisp/RCS/isearch-mode.el,v 1.13 1992/10/27 04:11:46 rms Exp rms $ | 91 ;;; $Header: /gd/gnu/emacs/19.0/lisp/RCS/isearch-mode.el,v 1.14 1992/11/01 22:10:59 rms Exp $ |
92 ;;; $Log: isearch-mode.el,v $ | 92 ;;; $Log: isearch-mode.el,v $ |
93 ; Revision 1.14 1992/11/01 22:10:59 rms | |
94 ; (isearch-search): Handle all sorts of errors from regexp search. | |
95 ; | |
93 ; Revision 1.13 1992/10/27 04:11:46 rms | 96 ; Revision 1.13 1992/10/27 04:11:46 rms |
94 ; (isearch-edit-string): | 97 ; (isearch-edit-string): |
95 ; Bind cursor-in-echo-area only around read-char/allocate-event. | 98 ; Bind cursor-in-echo-area only around read-char/allocate-event. |
96 ; | 99 ; |
97 ; Revision 1.12 1992/10/20 21:21:47 rms | 100 ; Revision 1.12 1992/10/20 21:21:47 rms |
146 ;; different versions of emacs. Rather than testing the version of | 149 ;; different versions of emacs. Rather than testing the version of |
147 ;; emacs, several constants are defined, one for each of the features. | 150 ;; emacs, several constants are defined, one for each of the features. |
148 ;; Each of the tests below must work on any version of emacs. | 151 ;; Each of the tests below must work on any version of emacs. |
149 ;; (Perhaps provide and featurep could be used for this purpose.) | 152 ;; (Perhaps provide and featurep could be used for this purpose.) |
150 | 153 |
151 (defconst isearch-frames-exist (fboundp 'select-frame)) ;; emacs 19 | 154 (defconst isearch-gnu-emacs-events (fboundp 'set-frame-height)) ;; emacs 19 |
152 (defconst isearch-pre-command-hook-exists (boundp 'pre-command-hook)) ;; lemacs | 155 (defconst isearch-pre-command-hook-exists (boundp 'pre-command-hook)) ;; lemacs |
153 (defconst isearch-event-data-type nil) ;; lemacs | 156 (defconst isearch-event-data-type nil) ;; lemacs |
154 | 157 |
155 (defconst search-exit-option t | 158 (defconst search-exit-option t |
156 "*Non-nil means random control characters terminate incremental search.") | 159 "*Non-nil means random control characters terminate incremental search.") |
298 ;;; 'isearch-other-meta-char) | 301 ;;; 'isearch-other-meta-char) |
299 ;;; (setq i (1+ i))) | 302 ;;; (setq i (1+ i))) |
300 | 303 |
301 (define-key map "\M-n" 'isearch-ring-advance) | 304 (define-key map "\M-n" 'isearch-ring-advance) |
302 (define-key map "\M-p" 'isearch-ring-retreat) | 305 (define-key map "\M-p" 'isearch-ring-retreat) |
306 | |
303 (define-key map "\M-\t" 'isearch-complete) | 307 (define-key map "\M-\t" 'isearch-complete) |
304 | 308 |
305 ;; For emacs 19, switching frames should terminate isearch-mode | 309 ;; For emacs 19, switching frames should terminate isearch-mode |
306 (if isearch-frames-exist | 310 (if isearch-gnu-emacs-events |
307 (define-key map [switch-frame] 'isearch-switch-frame-handler)) | 311 (define-key map [switch-frame] 'isearch-switch-frame-handler)) |
308 | 312 |
309 (setq isearch-mode-map map) | 313 (setq isearch-mode-map map) |
310 )) | 314 )) |
311 | 315 |
537 | 541 |
538 (defun isearch-update () | 542 (defun isearch-update () |
539 ;; Called after each command to update the display. | 543 ;; Called after each command to update the display. |
540 (if (if isearch-event-data-type | 544 (if (if isearch-event-data-type |
541 (null unread-command-event) | 545 (null unread-command-event) |
542 (if isearch-frames-exist | 546 (if isearch-gnu-emacs-events |
543 (null unread-command-char) | 547 (null unread-command-char) |
544 (< unread-command-char 0))) | 548 (< unread-command-char 0))) |
545 (progn | 549 (progn |
546 (if (not (input-pending-p)) | 550 (if (not (input-pending-p)) |
547 (isearch-message)) | 551 (isearch-message)) |