mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-21 18:23:59 +00:00
(compile-goto-error): Select the buffer/window corresponding to the event.
This commit is contained in:
parent
42b369cd7c
commit
912f0c34b2
@ -1370,12 +1370,14 @@ Use this command in a compilation log buffer. Sets the mark at point there."
|
|||||||
(interactive (list last-input-event))
|
(interactive (list last-input-event))
|
||||||
(or (compilation-buffer-p (current-buffer))
|
(or (compilation-buffer-p (current-buffer))
|
||||||
(error "Not in a compilation buffer"))
|
(error "Not in a compilation buffer"))
|
||||||
(let ((pos (if event (posn-point (event-end event)) (point))))
|
(let* ((loc (event-end event))
|
||||||
(if (get-text-property (point) 'directory)
|
(pos (posn-point loc)))
|
||||||
(dired-other-window (car (get-text-property pos 'directory)))
|
(with-selected-window (posn-window loc)
|
||||||
(push-mark)
|
(if (get-text-property pos 'directory)
|
||||||
(setq compilation-current-error pos)
|
(dired-other-window (car (get-text-property pos 'directory)))
|
||||||
(next-error 0))))
|
(push-mark)
|
||||||
|
(setq compilation-current-error pos)
|
||||||
|
(next-error 0)))))
|
||||||
|
|
||||||
;; Return a compilation buffer.
|
;; Return a compilation buffer.
|
||||||
;; If the current buffer is a compilation buffer, return it.
|
;; If the current buffer is a compilation buffer, return it.
|
||||||
|
Loading…
Reference in New Issue
Block a user