* 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
(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)
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
(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))
(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))
))
)))