Commit 8bef7b6a authored by Dmitry Gutov's avatar Dmitry Gutov

Only show "Back" when the marker stack is non-empty

* lisp/menu-bar.el (menu-bar-goto-menu): Use it.

* lisp/progmodes/xref.el (xref-marker-stack-empty-p): New function.
parent 54962365
2015-01-03 Dmitry Gutov <>
* progmodes/xref.el (xref-marker-stack-empty-p): New function.
* menu-bar.el (menu-bar-goto-menu): Use it.
2015-01-03 Dmitry Gutov <>
* progmodes/xref.el (xref--window-configuration): New variable.
......@@ -381,6 +381,7 @@
(bindings--define-key menu [xref-pop]
'(menu-item "Back" xref-pop-marker-stack
:visible (not (xref-marker-stack-empty-p))
:help "Back to the position of the last search"))
(bindings--define-key menu [xref-apropos]
......@@ -301,6 +301,10 @@ backward."
(let ((marker (ring-remove ring)))
(set-marker marker nil nil)))))
(defun xref-marker-stack-empty-p ()
"Return t if the marker stack is empty; nil otherwise."
(ring-empty-p xref--marker-ring))
(defun xref--goto-location (location)
"Set buffer and point according to xref-location LOCATION."
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