From 1fc01b083c6e8be87a06e24afcba9a4dc2b6ca09 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 13 Aug 2009 00:58:54 +0000 Subject: [PATCH] * progmodes/compile.el (compilation-goto-locus): Use next-error-move-function. --- lisp/ChangeLog | 3 +++ lisp/progmodes/compile.el | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cf1fc8c0aa8..c4268c45cac 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 6249f50cc9c..a20f14ced91 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -2078,10 +2078,12 @@ and overlay is highlighted between MK and END-MK." (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))) -- 2.39.5