X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lisp%2Fisearch-mode.el;h=3cb2440fb1a50d94cc9a13ddfdc73a34d672b30b;hp=3eef6c9c10efb0364863031f73a2478df7d62e17;hb=5378ab6d2bb24fd8d39025be1574d406cf91f141;hpb=ea1ea793fe6e244ef5555ed983423a204101af13 diff --git a/lisp/isearch-mode.el b/lisp/isearch-mode.el index 3eef6c9..3cb2440 100644 --- a/lisp/isearch-mode.el +++ b/lisp/isearch-mode.el @@ -180,8 +180,8 @@ an overlay having an `invisible' property and that overlay has a property This variable makes a difference when `search-invisible' is set to `open'. It means that after search makes some invisible text visible to show the match, it makes the text invisible again when the match moves. -Ordinarily the text becomes invisible again at the end of the search." - :type 'boolean +Ordinarily the text becomes invisible again at the end of the search." + :type 'boolean :group 'isearch) (defvar isearch-mode-hook nil @@ -533,7 +533,7 @@ is treated as a regexp. See \\[isearch-forward] for more info." isearch-opoint (point) search-ring-yank-pointer nil regexp-search-ring-yank-pointer nil - isearch-opened-extents nil + isearch-unhidden-extents nil isearch-window-configuration (current-window-configuration) ;; #### What we really need is a buffer-local @@ -674,7 +674,7 @@ is treated as a regexp. See \\[isearch-forward] for more info." (defun isearch-update-ring (string &optional regexp) "Add STRING to the beginning of the search ring. REGEXP says which ring to use." - (if regexp + (if regexp (if (or (null regexp-search-ring) (not (string= string (car regexp-search-ring)))) (progn @@ -1210,7 +1210,8 @@ Obsolete." (set yank-pointer-name (setq yank-pointer (mod (+ (or yank-pointer 0) - (if advance -1 1)) + ;; XEmacs change + (if advance -1 (if yank-pointer 1 0))) length))) (setq isearch-string (nth yank-pointer ring) isearch-message (mapconcat 'isearch-text-char-description @@ -1339,7 +1340,7 @@ If there is no completion possible, say so and continue searching." (defun isearch-top-state () (let ((cmd (car isearch-cmds))) ;; #### Grr, this is so error-prone. If you add something to - ;; isearch-push-state, don't forget to update this. I thout I'd + ;; isearch-push-state, don't forget to update this. I thought I'd ;; make a list of variables, and just do (mapcar* #'set vars ;; values), but the (point) thing would spoil it, leaving to more ;; complication. @@ -1604,7 +1605,7 @@ If there is no completion possible, say so and continue searching." (defun isearch-make-extent (begin end) (let ((x (make-extent begin end (current-buffer)))) - ;; make the isearch extent always take prescedence over any mouse- + ;; make the isearch extent always take precedence over any mouse- ;; highlighted extents we may be passing through, since isearch, being ;; modal, is more interesting (there's nothing they could do with a ;; mouse-highlighted extent while in the midst of a search anyway). @@ -1721,18 +1722,18 @@ If there is no completion possible, say so and continue searching." (put extent 'invisible nil) (put extent 'intangible nil)) -(defun isearch-range-invisible (beg end) - "Return t if all the text from BEG to END is invisible. +(defun isearch-range-invisible (start end) + "Return t if all the text from START to END is invisible. Before that, if search-invisible is `open', unhide the extents with an `isearch-open-invisible' property." ;; isearch-search uses this to skip the extents that are invisible, ;; but don't have `isearch-open-invisible' set. It is unclear - ;; what's supposed to happen if only a part of [BEG, END) overlaps + ;; what's supposed to happen if only a part of [START, END) overlaps ;; the extent. (let (to-be-unhidden) (if (map-extents (lambda (extent ignored) - (if (and (<= (extent-start-position extent) beg) + (if (and (<= (extent-start-position extent) start) (>= (extent-end-position extent) end)) ;; All of the region is covered by the extent. (if (and (eq search-invisible 'open) @@ -1746,7 +1747,7 @@ Before that, if search-invisible is `open', unhide the extents with an t) ;; Else, keep looking. nil)) - nil beg end nil 'all-extents-closed 'invisible) + nil start end nil 'all-extents-closed 'invisible) ;; The whole match must be skipped. Signal it by returning t ;; to the caller. t @@ -1765,9 +1766,9 @@ Before that, if search-invisible is `open', unhide the extents with an (remprop extent 'isearch-intangible)) ;; FSF calls this function `isearch-clean-overlays'. -(defun isearch-restore-invisible-extents (beg end) +(defun isearch-restore-invisible-extents (start end) (cond - ((null beg) + ((null start) ;; Delete all -- this is called at the end of isearch. (mapc #'isearch-restore-extent isearch-unhidden-extents) (setq isearch-unhidden-extents nil)) @@ -1776,7 +1777,7 @@ Before that, if search-invisible is `open', unhide the extents with an ;; restored to their hidden state. (setq isearch-unhidden-extents (delete-if (lambda (extent) - (unless (extent-in-region-p extent beg end + (unless (extent-in-region-p extent start end 'all-extents-closed) (isearch-restore-extent extent) t)) @@ -1883,8 +1884,7 @@ uppercase letters and `search-caps-disable-folding' is t." ;; buffer. (mapc #'delete-extent isearch-highlight-extents) (setq isearch-highlight-extents nil) - (setq isearch-highlight-all-start nil - isearch-window-end nil + (setq isearch-window-end nil isearch-highlight-last-string nil)) (defun isearch-highlight-all-update () @@ -1914,7 +1914,7 @@ uppercase letters and `search-caps-disable-folding' is t." ;; It would be nice if we didn't have to do this; however, ;; window-start doesn't support a GUARANTEE flag, so we must - ;; force redisplay to get the correct valye for start and end + ;; force redisplay to get the correct value for start and end ;; of window. (sit-for 0)