]> git.eshelyaron.com Git - emacs.git/commitdiff
(sh-mark-init): Don't set `occur-buffer'.
authorJuanma Barranquero <lekktu@gmail.com>
Tue, 24 Sep 2002 10:18:05 +0000 (10:18 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Tue, 24 Sep 2002 10:18:05 +0000 (10:18 +0000)
(sh-mark-line): Likewise. Use 'occur-target and 'occur-match instead of 'occur
and 'occur-point.

lisp/ChangeLog
lisp/progmodes/sh-script.el

index 659545412011ea38195f46e19f50aa88daf3441b..1d7094c56984557471ea9114e6fc088c9322e130 100644 (file)
@@ -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  <handa@etl.go.jp>
 
        * international/quail.el (quail-completion): Be sure to scroll
index 1bd27f7d6237f4bfef0c2cb66263cbed4cd830ad..cee0956aed2797d5b182afe4a401fb4db2368150 100644 (file)
@@ -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))
            ))
       )))