Subject: bug#44611: Prefix arg for xref-goto-xref

From: Dmitry Gutov <[email-masked]>
Date: Wed, 17 Mar 2021 23:48:34 +0200

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.