Commit 9592a014 authored by Dmitry Gutov's avatar Dmitry Gutov

xref: Use other-window-scroll-buffer and user-error

* lisp/progmodes/xref.el (xref--display-position):
Set `other-window-scroll-buffer'.
(xref-goto-xref): Use `user-error'.
parent 36bfd694
2015-01-19 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/xref.el (xref--display-position):
Set `other-window-scroll-buffer'.
(xref-goto-xref): Use `user-error'.
2015-01-19 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/xref.el (xref--display-history): New variable.
......
......@@ -352,6 +352,7 @@ WINDOW controls how the buffer is displayed:
(let ((buf (current-buffer))
(win (selected-window)))
(with-current-buffer xref-buf
(setq-local other-window-scroll-buffer buf)
(xref--save-to-history buf win)))))
(defun xref--show-location (location)
......@@ -390,7 +391,7 @@ WINDOW controls how the buffer is displayed:
(interactive)
(back-to-indentation)
(let ((loc (or (xref--location-at-point)
(error "No reference at point")))
(user-error "No reference at point")))
(window xref--window))
(xref--quit)
(xref--pop-to-location loc window)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment