changeset 47595:64e6b86fa461

(sh-mark-init): Don't set `occur-buffer'. (sh-mark-line): Likewise. Use 'occur-target and 'occur-match instead of 'occur and 'occur-point.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 24 Sep 2002 10:17:46 +0000
parents a19407e61543
children dae15ca3bea7
files lisp/progmodes/sh-script.el
diffstat 1 files changed, 8 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/sh-script.el	Tue Sep 24 08:35:43 2002 +0000
+++ b/lisp/progmodes/sh-script.el	Tue Sep 24 10:17:46 2002 +0000
@@ -2655,13 +2655,11 @@
 
 (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 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 @@
 	  (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 @@
       (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))
 	    ))
       )))