bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#46119: 28.0.50; this-error-recenter


From: Juri Linkov
Subject: bug#46119: 28.0.50; this-error-recenter
Date: Wed, 03 Feb 2021 10:58:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> I must set the buffer with the locus current, otherwise `recenter' rises
> an error:
>
> (defun recenter-current-error (&optional arg)
>   "Recenter the current displayed error in the `next-error' buffer."
>   (interactive "P")
>   (save-selected-window
>     (let ((next-error-highlight next-error-highlight-no-select)
>           (display-buffer-overriding-action
>            '(nil (inhibit-same-window . t))))
>       (next-error 0)
>       (set-buffer (window-buffer))
>       (recenter-top-bottom arg))))

Would it be possible to avoid code duplication between
next-error-no-select and recenter-current-error?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]