diff options
| author | Juanma Barranquero | 2002-09-24 10:18:05 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2002-09-24 10:18:05 +0000 |
| commit | 348e141150f9b983ea4a997c8feed5bd4c45253b (patch) | |
| tree | 9f5b694a5eda6d102cfbfcd777c21865014f92e2 | |
| parent | 123d55481b2a42dde751c2d3b74d05e001ef602b (diff) | |
| download | emacs-348e141150f9b983ea4a997c8feed5bd4c45253b.tar.gz emacs-348e141150f9b983ea4a997c8feed5bd4c45253b.zip | |
(sh-mark-init): Don't set `occur-buffer'.
(sh-mark-line): Likewise. Use 'occur-target and 'occur-match instead of 'occur
and 'occur-point.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/progmodes/sh-script.el | 20 |
2 files changed, 12 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 65954541201..1d7094c5698 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -3,6 +3,10 @@ | |||
| 3 | * replace.el (occur-find-match): New function. | 3 | * replace.el (occur-find-match): New function. |
| 4 | (occur-next, occur-prev): Use it. | 4 | (occur-next, occur-prev): Use it. |
| 5 | 5 | ||
| 6 | * progmodes/sh-script.el (sh-mark-init): Don't set `occur-buffer'. | ||
| 7 | (sh-mark-line): Likewise. Use 'occur-target and 'occur-match | ||
| 8 | instead of 'occur and 'occur-point. | ||
| 9 | |||
| 6 | 2002-09-23 Kenichi Handa <handa@etl.go.jp> | 10 | 2002-09-23 Kenichi Handa <handa@etl.go.jp> |
| 7 | 11 | ||
| 8 | * international/quail.el (quail-completion): Be sure to scroll | 12 | * 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." | |||
| 2655 | 2655 | ||
| 2656 | (defun sh-mark-init (buffer) | 2656 | (defun sh-mark-init (buffer) |
| 2657 | "Initialize a BUFFER to be used by `sh-mark-line'." | 2657 | "Initialize a BUFFER to be used by `sh-mark-line'." |
| 2658 | (let ((main-buffer (current-buffer))) | 2658 | (save-excursion |
| 2659 | (save-excursion | 2659 | (set-buffer (get-buffer-create buffer)) |
| 2660 | (set-buffer (get-buffer-create buffer)) | 2660 | (erase-buffer) |
| 2661 | (erase-buffer) | 2661 | (occur-mode) |
| 2662 | (occur-mode) | 2662 | )) |
| 2663 | (setq occur-buffer main-buffer) | ||
| 2664 | ))) | ||
| 2665 | 2663 | ||
| 2666 | 2664 | ||
| 2667 | (defun sh-mark-line (message point buffer &optional add-linenum occur-point) | 2665 | (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. | |||
| 2671 | If OCCUR-POINT is non-nil then the line is marked as a new occurrence | 2669 | If OCCUR-POINT is non-nil then the line is marked as a new occurrence |
| 2672 | so that `occur-next' and `occur-prev' will work." | 2670 | so that `occur-next' and `occur-prev' will work." |
| 2673 | (let ((m1 (make-marker)) | 2671 | (let ((m1 (make-marker)) |
| 2674 | (main-buffer (current-buffer)) | ||
| 2675 | start | 2672 | start |
| 2676 | (line "")) | 2673 | (line "")) |
| 2677 | (when point | 2674 | (when point |
| @@ -2683,7 +2680,6 @@ so that `occur-next' and `occur-prev' will work." | |||
| 2683 | (set-buffer (get-buffer buffer)) | 2680 | (set-buffer (get-buffer buffer)) |
| 2684 | (set-buffer (get-buffer-create buffer)) | 2681 | (set-buffer (get-buffer-create buffer)) |
| 2685 | (occur-mode) | 2682 | (occur-mode) |
| 2686 | (setq occur-buffer main-buffer) | ||
| 2687 | ) | 2683 | ) |
| 2688 | (goto-char (point-max)) | 2684 | (goto-char (point-max)) |
| 2689 | (setq start (point)) | 2685 | (setq start (point)) |
| @@ -2699,10 +2695,10 @@ so that `occur-next' and `occur-prev' will work." | |||
| 2699 | (insert "\n") | 2695 | (insert "\n") |
| 2700 | (if point | 2696 | (if point |
| 2701 | (progn | 2697 | (progn |
| 2702 | (put-text-property start (point) 'occur m1) | 2698 | (put-text-property start (point) 'occur-target m1) |
| 2703 | (if occur-point | 2699 | (if occur-point |
| 2704 | (put-text-property occur-point (1+ occur-point) | 2700 | (put-text-property start occur-point |
| 2705 | 'occur-point t)) | 2701 | 'occur-match t)) |
| 2706 | )) | 2702 | )) |
| 2707 | ))) | 2703 | ))) |
| 2708 | 2704 | ||