summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2015-01-19 05:29:37 +0200
committerDmitry Gutov <dgutov@yandex.ru>2015-01-19 05:29:37 +0200
commit9592a014df784e67a4647d5b6424f2758dfaad3c (patch)
treefe4db831089f9cac3511698c8fe4c915480f2cd7 /lisp
parent36bfd6947f8671eb279d8aa8f2976ada24361dec (diff)
downloademacs-9592a014df784e67a4647d5b6424f2758dfaad3c.tar.gz
emacs-9592a014df784e67a4647d5b6424f2758dfaad3c.tar.bz2
emacs-9592a014df784e67a4647d5b6424f2758dfaad3c.zip
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'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/progmodes/xref.el3
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 39d9436b3f1..3991885d2ec 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,11 @@
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.
(xref--window-configuration): Remove.
(xref--save-to-history): New function.
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 4431cb5d3b3..12123c8f2e2 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -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)))