|
From: | Dmitry Gutov |
Subject: | bug#44611: Prefix arg for xref-goto-xref |
Date: | Wed, 17 Mar 2021 23:48:34 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
On 17.03.2021 19:23, Juri Linkov wrote:
(defun next-error-quit-window () (when (and (eq current-prefix-arg 0) (not (eq next-error-last-buffer (current-buffer)))) (let ((window (get-buffer-window next-error-last-buffer))) (when (window-live-p window) (with-selected-window window (quit-restore-window window)))))) (add-hook 'next-error-hook 'next-error-quit-window)Since next-error-hook is a defcustom, perhaps we can/should include this function as one of the advertised values in :type? Even if we keep the list nil by default.I completely forgot that we have 'next-error-found-function', so implemented it with 'next-error-hook'. I don't remember why we have both.
next-error-found-function was added recently, and I guess it's handy to have FROM-BUFFER and TO-BUFFER available.
I can't find any specific previous uses for it, though.
Anyway, here is a patch with corrections from Martin:
LGTM.
[Prev in Thread] | Current Thread | [Next in Thread] |