diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2004-04-23 14:44:11 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2004-04-23 14:44:11 +0000 |
commit | ced7ed5611e2a6e60a5ac7a97e165545843d0fa9 (patch) | |
tree | 85194b67c680d1a37af652a4b614a7e1fcd336ba /lisp/replace.el | |
parent | 6ad9aaa961f1ac376bdaa1a5516d0481e6c7fafa (diff) | |
parent | f24814e0e9806db8d01c16b8d8592d6e9b9ee481 (diff) | |
download | emacs-ced7ed5611e2a6e60a5ac7a97e165545843d0fa9.tar.gz emacs-ced7ed5611e2a6e60a5ac7a97e165545843d0fa9.tar.bz2 emacs-ced7ed5611e2a6e60a5ac7a97e165545843d0fa9.zip |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-230
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-231
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-232
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-233
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-234
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-235
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-236
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-237
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-238
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-239
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-240
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-152
Diffstat (limited to 'lisp/replace.el')
-rw-r--r-- | lisp/replace.el | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index 2d26cb5cc66..e14e1314352 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -538,6 +538,7 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it. (set (make-local-variable 'revert-buffer-function) 'occur-revert-function) (make-local-variable 'occur-revert-arguments) (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) + (setq next-error-function 'occur-next-error) (run-hooks 'occur-mode-hook)) (defun occur-revert-function (ignore1 ignore2) @@ -614,6 +615,21 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it. "Move to the Nth (default 1) previous match in an Occur mode buffer." (interactive "p") (occur-find-match n #'previous-single-property-change "No earlier matches")) + +(defun occur-next-error (&optional argp reset) + "Move to the Nth (default 1) next match in an Occur mode buffer. +Compatibility function for \\[next-error] invocations." + (interactive "p") + (when reset + (occur-find-match 0 #'next-single-property-change "No first match")) + (occur-find-match + (prefix-numeric-value argp) + (if (> 0 (prefix-numeric-value argp)) + #'previous-single-property-change + #'next-single-property-change) + "No more matches") + (occur-mode-goto-occurrence)) + (defcustom list-matching-lines-default-context-lines 0 "*Default number of context lines included around `list-matching-lines' matches. @@ -800,7 +816,9 @@ See also `multi-occur'." (setq occur-revert-arguments (list regexp nlines bufs) buffer-read-only t) (if (> count 0) - (display-buffer occur-buf) + (progn + (display-buffer occur-buf) + (setq next-error-last-buffer occur-buf)) (kill-buffer occur-buf))) (run-hooks 'occur-hook)))) |