]> git.eshelyaron.com Git - emacs.git/commitdiff
(next-error-recenter): New defcustom.
authorThien-Thi Nguyen <ttn@gnuvola.org>
Fri, 22 Jun 2007 07:56:01 +0000 (07:56 +0000)
committerThien-Thi Nguyen <ttn@gnuvola.org>
Fri, 22 Jun 2007 07:56:01 +0000 (07:56 +0000)
(next-error, next-error-internal): Recenter if specified,
immediately prior to running `next-error-hook'.

lisp/ChangeLog
lisp/simple.el

index 3b0feac8f55a296698597822ee692e8067e1939b..a38e26710f0c813ab923b5d5c90963057c120a40 100644 (file)
@@ -1,3 +1,9 @@
+2007-06-22  Thien-Thi Nguyen  <ttn@gnuvola.org>
+
+       * simple.el (next-error-recenter): New defcustom.
+       (next-error, next-error-internal): Recenter if specified,
+       immediately prior to running `next-error-hook'.
+
 2007-06-22  Jay Belanger  <jay.p.belanger@gmail.com>
 
        * calc/calc-comb.el (math-small-factorial-table): New variable.
@@ -22,7 +28,7 @@
 2007-06-22  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * vc-bzr.el (vc-bzr-log-view-mode): Add + to the email address
-       regexp. 
+       regexp.
 
        * vc-hg.el (vc-hg-log-view-mode): New mode.
 
@@ -48,7 +54,7 @@
 
        * textmodes/org.el  (org-export-with-footnotes): New option.
        (org-export-as-html): Fixed replacement bug for XEmacs.
-       (org-agenda-default-appointment-duration): New option. 
+       (org-agenda-default-appointment-duration): New option.
 
 2007-06-21  Dan Nicolaescu  <dann@ics.uci.edu>
 
index daedae6100c42c9b8004d1842f1a496e38800b2d..765032f9f8da50fc459e006325fe3e6ef716ccee 100644 (file)
@@ -156,6 +156,14 @@ If `fringe-arrow', indicate the locus by the fringe arrow."
   :group 'next-error
   :version "22.1")
 
+(defcustom next-error-recenter nil
+  "*Display the line in the visited source file recentered to this number.
+If nil, don't do any recentering.  See `recenter'."
+  :type '(choice (number :tag "Argument for `recenter'")
+                 (const :tag "No recentering" nil))
+  :group 'next-error
+  :version "23.1")
+
 (defcustom next-error-hook nil
   "*List of hook functions run by `next-error' after visiting source file."
   :type 'hook
@@ -305,6 +313,8 @@ See variables `compilation-parse-errors-function' and
     ;; we know here that next-error-function is a valid symbol we can funcall
     (with-current-buffer next-error-last-buffer
       (funcall next-error-function (prefix-numeric-value arg) reset)
+      (when next-error-recenter
+        (recenter next-error-recenter))
       (run-hooks 'next-error-hook))))
 
 (defun next-error-internal ()
@@ -313,6 +323,8 @@ See variables `compilation-parse-errors-function' and
   ;; we know here that next-error-function is a valid symbol we can funcall
   (with-current-buffer next-error-last-buffer
     (funcall next-error-function 0 nil)
+    (when next-error-recenter
+      (recenter next-error-recenter))
     (run-hooks 'next-error-hook)))
 
 (defalias 'goto-next-locus 'next-error)