comparison lisp/isearch.el @ 1883:b707809f29bb

(isearch-backward-regexp): New arg no-recursive-edit, always non-nil for interactive call. Rename first arg, and set it right in interactive call. (isearch-forward-regexp): Likewise. (isearch-forward, isearch-backward): Likewise no-recursive-edit.
author Richard M. Stallman <rms@gnu.org>
date Wed, 17 Feb 1993 20:34:20 +0000
parents 04fb1d3d6992
children 9e79ffe97d5b
comparison
equal deleted inserted replaced
1882:83fc53d66a31 1883:b707809f29bb
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/11/16 01:37:06 $|$Revision: 1.16 $|~/modes/isearch-mode.el 7 ;; |$Date: 1993/01/26 01:48:27 $|$Revision: 1.17 $|~/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: /home/gd/gnu/emacs/19.0/lisp/RCS/isearch-mode.el,v 1.16 1992/11/16 01:37:06 jimb Exp jimb $ 91 ;;; $Header: /gd/gnu/emacs/19.0/lisp/RCS/isearch-mode.el,v 1.17 1993/01/26 01:48:27 jimb Exp rms $
92 ;;; $Log: isearch-mode.el,v $ 92 ;;; $Log: isearch-mode.el,v $
93 ; Revision 1.17 1993/01/26 01:48:27 jimb
94 ; JimB's changes since January 18th
95 ;
93 ; Revision 1.16 1992/11/16 01:37:06 jimb 96 ; Revision 1.16 1992/11/16 01:37:06 jimb
94 ; * bytecomp.el: Declare unread-command-char an obsolete variable. 97 ; * bytecomp.el: Declare unread-command-char an obsolete variable.
95 ; * vip.el (vip-escape-to-emacs, vip-prefix-arg-value, 98 ; * vip.el (vip-escape-to-emacs, vip-prefix-arg-value,
96 ; vip-prefix-arg-com): Use unread-command-event instead of 99 ; vip-prefix-arg-com): Use unread-command-event instead of
97 ; unread-command-char; respect its new semantics. 100 ; unread-command-char; respect its new semantics.
421 ;;; Entry points to isearch-mode. 424 ;;; Entry points to isearch-mode.
422 ;;; These four functions should replace those in loaddefs.el 425 ;;; These four functions should replace those in loaddefs.el
423 ;;; An alternative is to fset isearch-forward etc to isearch-mode, 426 ;;; An alternative is to fset isearch-forward etc to isearch-mode,
424 ;;; and look at this-command to set the options accordingly. 427 ;;; and look at this-command to set the options accordingly.
425 428
426 (defun isearch-forward (&optional regexp-p) 429 (defun isearch-forward (&optional regexp-p no-recursive-edit)
427 "\ 430 "\
428 Do incremental search forward. 431 Do incremental search forward.
429 With a prefix argument, do an incremental regular expression search instead. 432 With a prefix argument, do an incremental regular expression search instead.
430 \\<isearch-mode-map> 433 \\<isearch-mode-map>
431 As you type characters, they add to the search string and are found. 434 As you type characters, they add to the search string and are found.
460 and are then executed normally (depending on `search-exit-option'). 463 and are then executed normally (depending on `search-exit-option').
461 464
462 If this function is called non-interactively, it does not return to 465 If this function is called non-interactively, it does not return to
463 the calling function until the search is done." 466 the calling function until the search is done."
464 467
465 (interactive "P") 468 (interactive "P\np")
466 (isearch-mode t (not (null regexp-p)) nil (not (interactive-p)))) 469 (isearch-mode t (not (null regexp-p)) nil no-recursive-edit))
467 470
468 (defun isearch-forward-regexp (&optional regexp-p) 471 (defun isearch-forward-regexp (&optional not-regexp no-recursive-edit)
469 "\ 472 "\
470 Do incremental search forward for regular expression. 473 Do incremental search forward for regular expression.
471 With a prefix argument, do a regular string search instead. 474 With a prefix argument, do a regular string search instead.
472 Like ordinary incremental search except that your input 475 Like ordinary incremental search except that your input
473 is treated as a regexp. See \\[isearch-forward] for more info." 476 is treated as a regexp. See \\[isearch-forward] for more info."
474 (interactive) 477 (interactive "P\np")
475 (isearch-mode t (null regexp-p) nil (not (interactive-p)))) 478 (isearch-mode t (null not-regexp) nil no-recursive-edit))
476 479
477 (defun isearch-backward (&optional regexp-p) 480 (defun isearch-backward (&optional regexp-p no-recursive-edit)
478 "\ 481 "\
479 Do incremental search backward. 482 Do incremental search backward.
480 With a prefix argument, do a regular expression search instead. 483 With a prefix argument, do a regular expression search instead.
481 See \\[isearch-forward] for more information." 484 See \\[isearch-forward] for more information."
482 (interactive) 485 (interactive "P\np")
483 (isearch-mode nil (not (null regexp-p)) nil (not (interactive-p)))) 486 (isearch-mode nil (not (null regexp-p)) nil no-recursive-edit))
484 487
485 (defun isearch-backward-regexp (&optional regexp-p) 488 (defun isearch-backward-regexp (&optional not-regexp no-recursive-edit)
486 "\ 489 "\
487 Do incremental search backward for regular expression. 490 Do incremental search backward for regular expression.
488 With a prefix argument, do a regular string search instead. 491 With a prefix argument, do a regular string search instead.
489 Like ordinary incremental search except that your input 492 Like ordinary incremental search except that your input
490 is treated as a regexp. See \\[isearch-forward] for more info." 493 is treated as a regexp. See \\[isearch-forward] for more info."
491 (interactive) 494 (interactive "P\np")
492 (isearch-mode nil (null regexp-p) nil (not (interactive-p)))) 495 (isearch-mode nil (null not-regexp) nil no-recursive-edit))
493 496
494 497
495 (defun isearch-mode-help () 498 (defun isearch-mode-help ()
496 (interactive) 499 (interactive)
497 (describe-function 'isearch-forward) 500 (describe-function 'isearch-forward)