]> git.eshelyaron.com Git - emacs.git/commit
Honor window-switching intents in xref-find-definitions (bug#28814)
authorJoão Távora <joaotavora@gmail.com>
Fri, 13 Oct 2017 14:13:14 +0000 (15:13 +0100)
committerJoão Távora <joaotavora@gmail.com>
Fri, 3 Nov 2017 16:13:35 +0000 (16:13 +0000)
commit2a973edeacefcabb9fd8024188b7e167f0f9a9b6
tree2e772d100244902f0dee7d0f8c5c053b29a4937c
parent78e9065e9f090ea9c10f89495eab9f8069597b74
Honor window-switching intents in xref-find-definitions (bug#28814)

When there is more than one xref to jump to, and an *xref* window
appears to help the user choose, the original intent to open a
definition in another window or frame is remembered when the choice to
go to or show a reference is finally made.

* lisp/progmodes/xref.el (xref--show-pos-in-buf): Rewrite.
(xref--original-window-intent): New variable.
(xref--original-window): Rename from xref--window and move up
here for clarity.
(xref--show-pos-in-buf): Rewrite.  Don't take SELECT arg here.
(xref--show-location): Handle window selection decision here.
(xref--window): Rename to xref--original-window.
(xref-show-location-at-point): Don't attempt window management here.
(xref--show-xrefs): Ensure display-action intent is saved.
lisp/progmodes/xref.el