aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2005-07-09 20:46:26 +0000
committerJuri Linkov2005-07-09 20:46:26 +0000
commitd634a3a2de46f85f0b1f11f0b7b450419dbc0632 (patch)
tree3b232c41d1dd97d3e45052675b878040c073f1db
parent2894bd96e02ed21f81e59c93fedbdd9158abc58e (diff)
downloademacs-d634a3a2de46f85f0b1f11f0b7b450419dbc0632.tar.gz
emacs-d634a3a2de46f85f0b1f11f0b7b450419dbc0632.zip
(next-error-hook): New variable.
(next-error): Use it. Doc fix.
-rw-r--r--lisp/simple.el15
1 files changed, 11 insertions, 4 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index b5e7d188695..c2859fc35ef 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -110,6 +110,11 @@ If `fringe-arrow', indicate the locus by the fringe arrow."
110 :group 'next-error 110 :group 'next-error
111 :version "22.1") 111 :version "22.1")
112 112
113(defcustom next-error-hook nil
114 "*List of hook functions run by `next-error' after visiting source file."
115 :type 'hook
116 :group 'next-error)
117
113(defvar next-error-highlight-timer nil) 118(defvar next-error-highlight-timer nil)
114 119
115(defvar next-error-overlay-arrow-position nil) 120(defvar next-error-overlay-arrow-position nil)
@@ -240,9 +245,10 @@ To specify use of a particular buffer for error messages, type
240\\[next-error] in that buffer when it is the only one displayed 245\\[next-error] in that buffer when it is the only one displayed
241in the current frame. 246in the current frame.
242 247
243Once \\[next-error] has chosen the buffer for error messages, 248Once \\[next-error] has chosen the buffer for error messages, it
244it stays with that buffer until you use it in some other buffer which 249runs `next-error-hook' with `run-hooks', and stays with that buffer
245uses Compilation mode or Compilation Minor mode. 250until you use it in some other buffer which uses Compilation mode
251or Compilation Minor mode.
246 252
247See variables `compilation-parse-errors-function' and 253See variables `compilation-parse-errors-function' and
248\`compilation-error-regexp-alist' for customization ideas." 254\`compilation-error-regexp-alist' for customization ideas."
@@ -251,7 +257,8 @@ See variables `compilation-parse-errors-function' and
251 (when (setq next-error-last-buffer (next-error-find-buffer)) 257 (when (setq next-error-last-buffer (next-error-find-buffer))
252 ;; we know here that next-error-function is a valid symbol we can funcall 258 ;; we know here that next-error-function is a valid symbol we can funcall
253 (with-current-buffer next-error-last-buffer 259 (with-current-buffer next-error-last-buffer
254 (funcall next-error-function (prefix-numeric-value arg) reset)))) 260 (funcall next-error-function (prefix-numeric-value arg) reset)
261 (run-hooks 'next-error-hook))))
255 262
256(defalias 'goto-next-locus 'next-error) 263(defalias 'goto-next-locus 'next-error)
257(defalias 'next-match 'next-error) 264(defalias 'next-match 'next-error)