From: Juanma Barranquero Date: Tue, 24 Sep 2002 10:18:05 +0000 (+0000) Subject: (sh-mark-init): Don't set `occur-buffer'. X-Git-Tag: ttn-vms-21-2-B4~13077 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=348e141150f9b983ea4a997c8feed5bd4c45253b;p=emacs.git (sh-mark-init): Don't set `occur-buffer'. (sh-mark-line): Likewise. Use 'occur-target and 'occur-match instead of 'occur and 'occur-point. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 65954541201..1d7094c5698 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,10 @@ * replace.el (occur-find-match): New function. (occur-next, occur-prev): Use it. + * progmodes/sh-script.el (sh-mark-init): Don't set `occur-buffer'. + (sh-mark-line): Likewise. Use 'occur-target and 'occur-match + instead of 'occur and 'occur-point. + 2002-09-23 Kenichi Handa * international/quail.el (quail-completion): Be sure to scroll diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 1bd27f7d623..cee0956aed2 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -2655,13 +2655,11 @@ unless optional argument ARG (the prefix when interactive) is non-nil." (defun sh-mark-init (buffer) "Initialize a BUFFER to be used by `sh-mark-line'." - (let ((main-buffer (current-buffer))) - (save-excursion - (set-buffer (get-buffer-create buffer)) - (erase-buffer) - (occur-mode) - (setq occur-buffer main-buffer) - ))) + (save-excursion + (set-buffer (get-buffer-create buffer)) + (erase-buffer) + (occur-mode) + )) (defun sh-mark-line (message point buffer &optional add-linenum occur-point) @@ -2671,7 +2669,6 @@ If ADD-LINENUM is non-nil the message is preceded by the line number. If OCCUR-POINT is non-nil then the line is marked as a new occurrence so that `occur-next' and `occur-prev' will work." (let ((m1 (make-marker)) - (main-buffer (current-buffer)) start (line "")) (when point @@ -2683,7 +2680,6 @@ so that `occur-next' and `occur-prev' will work." (set-buffer (get-buffer buffer)) (set-buffer (get-buffer-create buffer)) (occur-mode) - (setq occur-buffer main-buffer) ) (goto-char (point-max)) (setq start (point)) @@ -2699,10 +2695,10 @@ so that `occur-next' and `occur-prev' will work." (insert "\n") (if point (progn - (put-text-property start (point) 'occur m1) + (put-text-property start (point) 'occur-target m1) (if occur-point - (put-text-property occur-point (1+ occur-point) - 'occur-point t)) + (put-text-property start occur-point + 'occur-match t)) )) )))