aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThien-Thi Nguyen2007-06-22 07:56:01 +0000
committerThien-Thi Nguyen2007-06-22 07:56:01 +0000
commit446b609eabcfd8d6661042af561bbc81247f91aa (patch)
tree49cf9bae999089b40046950a0cbba8c1e2c0ce75
parent3e9c6b0ac7b5c75984dec4a3eba08f1b06882c48 (diff)
downloademacs-446b609eabcfd8d6661042af561bbc81247f91aa.tar.gz
emacs-446b609eabcfd8d6661042af561bbc81247f91aa.zip
(next-error-recenter): New defcustom.
(next-error, next-error-internal): Recenter if specified, immediately prior to running `next-error-hook'.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/simple.el12
2 files changed, 20 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3b0feac8f55..a38e26710f0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12007-06-22 Thien-Thi Nguyen <ttn@gnuvola.org>
2
3 * simple.el (next-error-recenter): New defcustom.
4 (next-error, next-error-internal): Recenter if specified,
5 immediately prior to running `next-error-hook'.
6
12007-06-22 Jay Belanger <jay.p.belanger@gmail.com> 72007-06-22 Jay Belanger <jay.p.belanger@gmail.com>
2 8
3 * calc/calc-comb.el (math-small-factorial-table): New variable. 9 * calc/calc-comb.el (math-small-factorial-table): New variable.
@@ -22,7 +28,7 @@
222007-06-22 Dan Nicolaescu <dann@ics.uci.edu> 282007-06-22 Dan Nicolaescu <dann@ics.uci.edu>
23 29
24 * vc-bzr.el (vc-bzr-log-view-mode): Add + to the email address 30 * vc-bzr.el (vc-bzr-log-view-mode): Add + to the email address
25 regexp. 31 regexp.
26 32
27 * vc-hg.el (vc-hg-log-view-mode): New mode. 33 * vc-hg.el (vc-hg-log-view-mode): New mode.
28 34
@@ -48,7 +54,7 @@
48 54
49 * textmodes/org.el (org-export-with-footnotes): New option. 55 * textmodes/org.el (org-export-with-footnotes): New option.
50 (org-export-as-html): Fixed replacement bug for XEmacs. 56 (org-export-as-html): Fixed replacement bug for XEmacs.
51 (org-agenda-default-appointment-duration): New option. 57 (org-agenda-default-appointment-duration): New option.
52 58
532007-06-21 Dan Nicolaescu <dann@ics.uci.edu> 592007-06-21 Dan Nicolaescu <dann@ics.uci.edu>
54 60
diff --git a/lisp/simple.el b/lisp/simple.el
index daedae6100c..765032f9f8d 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -156,6 +156,14 @@ If `fringe-arrow', indicate the locus by the fringe arrow."
156 :group 'next-error 156 :group 'next-error
157 :version "22.1") 157 :version "22.1")
158 158
159(defcustom next-error-recenter nil
160 "*Display the line in the visited source file recentered to this number.
161If nil, don't do any recentering. See `recenter'."
162 :type '(choice (number :tag "Argument for `recenter'")
163 (const :tag "No recentering" nil))
164 :group 'next-error
165 :version "23.1")
166
159(defcustom next-error-hook nil 167(defcustom next-error-hook nil
160 "*List of hook functions run by `next-error' after visiting source file." 168 "*List of hook functions run by `next-error' after visiting source file."
161 :type 'hook 169 :type 'hook
@@ -305,6 +313,8 @@ See variables `compilation-parse-errors-function' and
305 ;; we know here that next-error-function is a valid symbol we can funcall 313 ;; we know here that next-error-function is a valid symbol we can funcall
306 (with-current-buffer next-error-last-buffer 314 (with-current-buffer next-error-last-buffer
307 (funcall next-error-function (prefix-numeric-value arg) reset) 315 (funcall next-error-function (prefix-numeric-value arg) reset)
316 (when next-error-recenter
317 (recenter next-error-recenter))
308 (run-hooks 'next-error-hook)))) 318 (run-hooks 'next-error-hook))))
309 319
310(defun next-error-internal () 320(defun next-error-internal ()
@@ -313,6 +323,8 @@ See variables `compilation-parse-errors-function' and
313 ;; we know here that next-error-function is a valid symbol we can funcall 323 ;; we know here that next-error-function is a valid symbol we can funcall
314 (with-current-buffer next-error-last-buffer 324 (with-current-buffer next-error-last-buffer
315 (funcall next-error-function 0 nil) 325 (funcall next-error-function 0 nil)
326 (when next-error-recenter
327 (recenter next-error-recenter))
316 (run-hooks 'next-error-hook))) 328 (run-hooks 'next-error-hook)))
317 329
318(defalias 'goto-next-locus 'next-error) 330(defalias 'goto-next-locus 'next-error)