diff options
| author | Dmitry Gutov | 2015-01-19 05:29:37 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2015-01-19 05:29:37 +0200 |
| commit | 9592a014df784e67a4647d5b6424f2758dfaad3c (patch) | |
| tree | fe4db831089f9cac3511698c8fe4c915480f2cd7 | |
| parent | 36bfd6947f8671eb279d8aa8f2976ada24361dec (diff) | |
| download | emacs-9592a014df784e67a4647d5b6424f2758dfaad3c.tar.gz 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'.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/progmodes/xref.el | 3 |
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 @@ | |||
| 1 | 2015-01-19 Dmitry Gutov <dgutov@yandex.ru> | 1 | 2015-01-19 Dmitry Gutov <dgutov@yandex.ru> |
| 2 | 2 | ||
| 3 | * progmodes/xref.el (xref--display-position): | ||
| 4 | Set `other-window-scroll-buffer'. | ||
| 5 | (xref-goto-xref): Use `user-error'. | ||
| 6 | |||
| 7 | 2015-01-19 Dmitry Gutov <dgutov@yandex.ru> | ||
| 8 | |||
| 3 | * progmodes/xref.el (xref--display-history): New variable. | 9 | * progmodes/xref.el (xref--display-history): New variable. |
| 4 | (xref--window-configuration): Remove. | 10 | (xref--window-configuration): Remove. |
| 5 | (xref--save-to-history): New function. | 11 | (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: | |||
| 352 | (let ((buf (current-buffer)) | 352 | (let ((buf (current-buffer)) |
| 353 | (win (selected-window))) | 353 | (win (selected-window))) |
| 354 | (with-current-buffer xref-buf | 354 | (with-current-buffer xref-buf |
| 355 | (setq-local other-window-scroll-buffer buf) | ||
| 355 | (xref--save-to-history buf win))))) | 356 | (xref--save-to-history buf win))))) |
| 356 | 357 | ||
| 357 | (defun xref--show-location (location) | 358 | (defun xref--show-location (location) |
| @@ -390,7 +391,7 @@ WINDOW controls how the buffer is displayed: | |||
| 390 | (interactive) | 391 | (interactive) |
| 391 | (back-to-indentation) | 392 | (back-to-indentation) |
| 392 | (let ((loc (or (xref--location-at-point) | 393 | (let ((loc (or (xref--location-at-point) |
| 393 | (error "No reference at point"))) | 394 | (user-error "No reference at point"))) |
| 394 | (window xref--window)) | 395 | (window xref--window)) |
| 395 | (xref--quit) | 396 | (xref--quit) |
| 396 | (xref--pop-to-location loc window))) | 397 | (xref--pop-to-location loc window))) |