# HG changeset patch # User Richard M. Stallman # Date 1250125134 0 # Node ID 9caaade61f030930463962a011c9cd29df23e6bf # Parent 81a43a652b4b8cb7b69618f811c674fcaa2c1a44 * progmodes/compile.el (compilation-goto-locus): Use next-error-move-function. diff -r 81a43a652b4b -r 9caaade61f03 lisp/ChangeLog --- a/lisp/ChangeLog Thu Aug 13 00:57:17 2009 +0000 +++ b/lisp/ChangeLog Thu Aug 13 00:58:54 2009 +0000 @@ -1,5 +1,8 @@ 2009-08-13 Richard Stallman + * progmodes/compile.el (compilation-goto-locus): + Use next-error-move-function. + * simple.el (next-error-move-function): New variable. 2009-08-12 Juri Linkov diff -r 81a43a652b4b -r 9caaade61f03 lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Thu Aug 13 00:57:17 2009 +0000 +++ b/lisp/progmodes/compile.el Thu Aug 13 00:58:54 2009 +0000 @@ -2078,10 +2078,12 @@ (if (window-dedicated-p (selected-window)) (pop-to-buffer (marker-buffer mk)) (switch-to-buffer (marker-buffer mk)))) - ;; If narrowing gets in the way of going to the right place, widen. (unless (eq (goto-char mk) (point)) + ;; If narrowing gets in the way of going to the right place, widen. (widen) - (goto-char mk)) + (if next-error-move-function + (funcall next-error-move-function msg mk) + (goto-char mk))) (if end-mk (push-mark end-mk t) (if mark-active (setq mark-active)))