diff options
| -rw-r--r-- | lisp/replace.el | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index 7e3dd984150..3b93761a0cc 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -719,7 +719,7 @@ See `occur-revert-function'.") | |||
| 719 | :group 'matching) | 719 | :group 'matching) |
| 720 | 720 | ||
| 721 | (defcustom occur-hook nil | 721 | (defcustom occur-hook nil |
| 722 | "Hook run when `occur' is called." | 722 | "Hook run by Occur when there are any matches." |
| 723 | :type 'hook | 723 | :type 'hook |
| 724 | :group 'matching) | 724 | :group 'matching) |
| 725 | 725 | ||
| @@ -1042,14 +1042,13 @@ See also `multi-occur'." | |||
| 1042 | (if (= count 1) "" "es") | 1042 | (if (= count 1) "" "es") |
| 1043 | regexp)) | 1043 | regexp)) |
| 1044 | (setq occur-revert-arguments (list regexp nlines bufs)) | 1044 | (setq occur-revert-arguments (list regexp nlines bufs)) |
| 1045 | (if (> count 0) | 1045 | (if (= count 0) |
| 1046 | (progn | 1046 | (kill-buffer occur-buf) |
| 1047 | (display-buffer occur-buf) | 1047 | (display-buffer occur-buf) |
| 1048 | (setq next-error-last-buffer occur-buf) | 1048 | (setq next-error-last-buffer occur-buf) |
| 1049 | (setq buffer-read-only t) | 1049 | (setq buffer-read-only t) |
| 1050 | (set-buffer-modified-p nil)) | 1050 | (set-buffer-modified-p nil) |
| 1051 | (kill-buffer occur-buf))) | 1051 | (run-hooks 'occur-hook))))))) |
| 1052 | (run-hooks 'occur-hook))))) | ||
| 1053 | 1052 | ||
| 1054 | (defun occur-engine-add-prefix (lines) | 1053 | (defun occur-engine-add-prefix (lines) |
| 1055 | (mapcar | 1054 | (mapcar |