* lisp/menu-bar.el (menu-bar-goto-menu): Use it.
* lisp/progmodes/xref.el (xref-marker-stack-empty-p): New function.
+2015-01-03 Dmitry Gutov <dgutov@yandex.ru>
+
+ * progmodes/xref.el (xref-marker-stack-empty-p): New function.
+
+ * menu-bar.el (menu-bar-goto-menu): Use it.
+
2015-01-03 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/xref.el (xref--window-configuration): New variable.
(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]
(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))
+
\f
(defun xref--goto-location (location)
"Set buffer and point according to xref-location LOCATION."