emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/isearch.el [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/isearch.el [emacs-unicode-2]
Date: Mon, 28 Jun 2004 04:38:52 -0400

Index: emacs/lisp/isearch.el
diff -c emacs/lisp/isearch.el:1.221.2.2 emacs/lisp/isearch.el:1.221.2.3
*** emacs/lisp/isearch.el:1.221.2.2     Fri Apr 16 12:50:05 2004
--- emacs/lisp/isearch.el       Mon Jun 28 07:28:42 2004
***************
*** 444,455 ****
  As you type characters, they add to the search string and are found.
  The following non-printing keys are bound in `isearch-mode-map'.
  
! Type \\[isearch-delete-char] to cancel characters from end of search string.
  Type \\[isearch-exit] to exit, leaving point at location found.
  Type LFD (C-j) to match end of line.
  Type \\[isearch-repeat-forward] to search again forward,\
   \\[isearch-repeat-backward] to search again backward.
! Type \\[isearch-yank-word-or-char] to yank word from buffer onto end of 
search\
   string and search for it.
  Type \\[isearch-yank-line] to yank rest of line onto end of search string\
   and search for it.
--- 444,458 ----
  As you type characters, they add to the search string and are found.
  The following non-printing keys are bound in `isearch-mode-map'.
  
! Type \\[isearch-delete-char] to cancel last input item from end of search 
string.
! Type \\[isearch-del-char] to cancel last character from end of search string.
  Type \\[isearch-exit] to exit, leaving point at location found.
  Type LFD (C-j) to match end of line.
  Type \\[isearch-repeat-forward] to search again forward,\
   \\[isearch-repeat-backward] to search again backward.
! Type \\[isearch-yank-char] to yank character from buffer onto end of search\
!  string and search for it.
! Type \\[isearch-yank-word] to yank word from buffer onto end of search\
   string and search for it.
  Type \\[isearch-yank-line] to yank rest of line onto end of search string\
   and search for it.
***************
*** 482,488 ****
  you want to use.
  
  The above keys, bound in `isearch-mode-map', are often controlled by
!  options; do M-x apropos on search-.* to find them.
  Other control and meta characters terminate the search
   and are then executed normally (depending on `search-exit-option').
  Likewise for function keys and mouse button events.
--- 485,491 ----
  you want to use.
  
  The above keys, bound in `isearch-mode-map', are often controlled by
!  options; do \\[apropos] on search-.* to find them.
  Other control and meta characters terminate the search
   and are then executed normally (depending on `search-exit-option').
  Likewise for function keys and mouse button events.
***************
*** 785,791 ****
  \\[isearch-ring-retreat-edit] to replace the search string with the previous 
item in the search ring.
  \\[isearch-complete-edit] to complete the search string using the search ring.
  \\<isearch-mode-map>
! If first char entered is \\[isearch-yank-word-or-char], then do word search 
instead."
  
    ;; This code is very hairy for several reasons, explained in the code.
    ;; Mainly, isearch-mode must be terminated while editing and then restarted.
--- 788,794 ----
  \\[isearch-ring-retreat-edit] to replace the search string with the previous 
item in the search ring.
  \\[isearch-complete-edit] to complete the search string using the search ring.
  \\<isearch-mode-map>
! If first char entered is \\[isearch-yank-word], then do word search instead."
  
    ;; This code is very hairy for several reasons, explained in the code.
    ;; Mainly, isearch-mode must be terminated while editing and then restarted.
***************
*** 992,998 ****
  
    (if (equal isearch-string "")
        (setq isearch-success t)
!     (if (and isearch-success (equal (match-end 0) (match-beginning 0))
             (not isearch-just-started))
        ;; If repeating a search that found
        ;; an empty string, ensure we advance.
--- 995,1002 ----
  
    (if (equal isearch-string "")
        (setq isearch-success t)
!     (if (and isearch-success
!            (equal (point) isearch-other-end)
             (not isearch-just-started))
        ;; If repeating a search that found
        ;; an empty string, ensure we advance.
***************
*** 1049,1054 ****
--- 1053,1068 ----
      (isearch-pop-state))
    (isearch-update))
  
+ (defun isearch-del-char ()
+   "Discard last character and move point back.
+ If there is no previous character, just beep."
+   (interactive)
+   (if (equal isearch-string "")
+       (ding)
+     (setq isearch-string (substring isearch-string 0 -1)
+           isearch-message (mapconcat 'isearch-text-char-description
+                                      isearch-string "")))
+   (isearch-search-and-update))
  
  (defun isearch-yank-string (string)
    "Pull STRING into search string."
***************
*** 1110,1116 ****
       (buffer-substring-no-properties (point) (funcall jumpform)))))
  
  (defun isearch-yank-char ()
!   "Pull next letter from buffer into search string."
    (interactive)
    (isearch-yank-internal (lambda () (forward-char 1) (point))))
  
--- 1124,1130 ----
       (buffer-substring-no-properties (point) (funcall jumpform)))))
  
  (defun isearch-yank-char ()
!   "Pull next character from buffer into search string."
    (interactive)
    (isearch-yank-internal (lambda () (forward-char 1) (point))))
  
***************
*** 1138,1146 ****
  (defun isearch-search-and-update ()
    ;; Do the search and update the display.
    (when (or isearch-success
!           ;; unsuccessful regexp search may become
!           ;;  successful by addition of characters which
!           ;;  make isearch-string valid
            isearch-regexp
            ;; If the string was found but was completely invisible,
            ;; it might now be partly visible, so try again.
--- 1152,1159 ----
  (defun isearch-search-and-update ()
    ;; Do the search and update the display.
    (when (or isearch-success
!           ;; Unsuccessful regexp search may become successful by
!           ;; addition of characters which make isearch-string valid
            isearch-regexp
            ;; If the string was found but was completely invisible,
            ;; it might now be partly visible, so try again.
***************
*** 1467,1473 ****
             (command-execute scroll-command)
             (let ((ab-bel (isearch-string-out-of-window isearch-point)))
               (if ab-bel
!                  (isearch-back-into-window (eq ab-bel 'above) isearch-point)))
             (isearch-update))
          (search-exit-option
           (let (window)
--- 1480,1488 ----
             (command-execute scroll-command)
             (let ((ab-bel (isearch-string-out-of-window isearch-point)))
               (if ab-bel
!                  (isearch-back-into-window (eq ab-bel 'above) isearch-point)
!                (or (eq (point) isearch-point)
!                    (goto-char isearch-point))))
             (isearch-update))
          (search-exit-option
           (let (window)
***************
*** 1746,1752 ****
    (let ((cursor-in-echo-area ellipsis)
        (m (concat
            (isearch-message-prefix c-q-hack ellipsis isearch-nonincremental)
!           isearch-message
            (isearch-message-suffix c-q-hack ellipsis)
            )))
      (if c-q-hack
--- 1761,1773 ----
    (let ((cursor-in-echo-area ellipsis)
        (m (concat
            (isearch-message-prefix c-q-hack ellipsis isearch-nonincremental)
!           (if (and (not isearch-success)
!                      (string-match " +$" isearch-message))
!                 (concat
!                  (substring isearch-message 0 (match-beginning 0))
!                  (propertize (substring isearch-message (match-beginning 0))
!                              'face 'trailing-whitespace))
!               isearch-message)
            (isearch-message-suffix c-q-hack ellipsis)
            )))
      (if c-q-hack
***************
*** 1793,1799 ****
  
  ;; Searching
  
! (defvar isearch-search-fun-function nil "Override `isearch-function-fun'.")
  
  (defun isearch-search-fun ()
    "Return the function to use for the search.
--- 1814,1824 ----
  
  ;; Searching
  
! (defvar isearch-search-fun-function nil
!   "Override `isearch-search-fun'.
! This function should return the search function for isearch to use.
! It will call this function with three arguments
! as if it were `search-forward'.")
  
  (defun isearch-search-fun ()
    "Return the function to use for the search.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]