[Emacs] Let xref window die once target selected

This commit is contained in:
Ivan Malison 2016-11-07 16:03:59 -08:00
parent 4c46ddc8d2
commit e0b339b0b1
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -1133,6 +1133,22 @@ programming mode.
(use-package ewmctrl
:demand t)
#+END_SRC
*** Handle xrefs annoying dedicated window garbage
#+BEGIN_SRC emacs-lisp
(defun xref--show-pos-in-buf (pos buf select)
(let ((xref-buf (current-buffer))
win)
(with-selected-window
(display-buffer buf)
(xref--goto-char pos)
(run-hooks 'xref-after-jump-hook)
(let ((buf (current-buffer)))
(setq win (selected-window))
(with-current-buffer xref-buf
(setq-local other-window-scroll-buffer buf))))
(when select
(select-window win))))
#+END_SRC
*** display-buffer-alist
#+BEGIN_SRC emacs-lisp
(defvar imalison:use-frames-only)