forked from colonelpanic/dotfiles
		
	[Emacs] Override xref function AFTER xref loaded
This commit is contained in:
		| @@ -1140,19 +1140,21 @@ programming mode. | |||||||
| #+END_SRC | #+END_SRC | ||||||
| *** Handle xrefs annoying dedicated window garbage | *** Handle xrefs annoying dedicated window garbage | ||||||
| #+BEGIN_SRC emacs-lisp | #+BEGIN_SRC emacs-lisp | ||||||
| (defun xref--show-pos-in-buf (pos buf select) | (use-package xref | ||||||
|   (let ((xref-buf (current-buffer)) |   :config | ||||||
|         win) |   (defun xref--show-pos-in-buf (pos buf select) | ||||||
|     (with-selected-window |     (let ((xref-buf (current-buffer)) | ||||||
|       (display-buffer buf) |           win) | ||||||
|       (xref--goto-char pos) |       (with-selected-window | ||||||
|       (run-hooks 'xref-after-jump-hook) |           (display-buffer buf) | ||||||
|       (let ((buf (current-buffer))) |         (xref--goto-char pos) | ||||||
|         (setq win (selected-window)) |         (run-hooks 'xref-after-jump-hook) | ||||||
|         (with-current-buffer xref-buf |         (let ((buf (current-buffer))) | ||||||
|           (setq-local other-window-scroll-buffer buf)))) |           (setq win (selected-window)) | ||||||
|     (when select |           (with-current-buffer xref-buf | ||||||
|       (select-window win)))) |             (setq-local other-window-scroll-buffer buf)))) | ||||||
|  |       (when select | ||||||
|  |         (select-window win))))) | ||||||
| #+END_SRC | #+END_SRC | ||||||
| *** display-buffer-alist | *** display-buffer-alist | ||||||
| #+BEGIN_SRC emacs-lisp | #+BEGIN_SRC emacs-lisp | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user