[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#44611: Prefix arg for xref-goto-xref
From: |
Juri Linkov |
Subject: |
bug#44611: Prefix arg for xref-goto-xref |
Date: |
Sun, 27 Dec 2020 18:22:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> On the subject of grep-mode, it could have a similar command introduced
> too, for situations when you only needed to find one occurrence, to jump to
> it and quit the window.
This is what I already successfully use:
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index d2293151c7..08c44dcb25 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -2572,11 +2572,15 @@ compile-goto-error
(or (compilation-buffer-p (current-buffer))
(error "Not in a compilation buffer"))
(compilation--ensure-parse (point))
+ (let ((window (posn-window (event-end event))))
(if (get-text-property (point) 'compilation-directory)
(dired-other-window
(car (get-text-property (point) 'compilation-directory)))
(setq compilation-current-error (point))
- (next-error-internal)))
+ (next-error-internal))
+ (when current-prefix-arg
+ (with-selected-window window
+ (quit-window)))))
;; This is mostly unused, but we keep it for the sake of some external
;; packages which seem to make use of it.
- bug#44611: Prefix arg for xref-goto-xref, (continued)
- bug#44611: Prefix arg for xref-goto-xref, Eli Zaretskii, 2020/12/23
- bug#44611: Prefix arg for xref-goto-xref, Dmitry Gutov, 2020/12/23
- bug#44611: Prefix arg for xref-goto-xref, Eli Zaretskii, 2020/12/23
- bug#44611: Prefix arg for xref-goto-xref, Dmitry Gutov, 2020/12/23
- bug#44611: Prefix arg for xref-goto-xref, Eli Zaretskii, 2020/12/24
- bug#44611: Prefix arg for xref-goto-xref, Juri Linkov, 2020/12/24
- bug#44611: Prefix arg for xref-goto-xref, Eli Zaretskii, 2020/12/24
- bug#44611: Prefix arg for xref-goto-xref, Juri Linkov, 2020/12/25
- bug#44611: Prefix arg for xref-goto-xref, Eli Zaretskii, 2020/12/25
- bug#44611: Prefix arg for xref-goto-xref, Dmitry Gutov, 2020/12/25
- bug#44611: Prefix arg for xref-goto-xref,
Juri Linkov <=
- bug#44611: Prefix arg for xref-goto-xref, martin rudalics, 2020/12/27
- bug#44611: Prefix arg for xref-goto-xref, Dmitry Gutov, 2020/12/27
- bug#44611: Prefix arg for xref-goto-xref, Juri Linkov, 2020/12/28
- bug#44611: Prefix arg for xref-goto-xref, Juri Linkov, 2020/12/27
- bug#44611: Prefix arg for xref-goto-xref, Eli Zaretskii, 2020/12/27
- bug#44611: Prefix arg for xref-goto-xref, Dmitry Gutov, 2020/12/27
- bug#44611: Prefix arg for xref-goto-xref, Juri Linkov, 2020/12/28
- bug#44611: Prefix arg for xref-goto-xref, Dmitry Gutov, 2020/12/25
- bug#44611: Prefix arg for xref-goto-xref, Juri Linkov, 2020/12/23
- bug#44611: Prefix arg for xref-goto-xref, Eli Zaretskii, 2020/12/23