]> code.delx.au - gnu-emacs/blobdiff - lisp/menu-bar.el
Fix line-move-visual's following of column in R2L lines.
[gnu-emacs] / lisp / menu-bar.el
index c5f587eb719fb709adf63a3ec3ab633a86138700..67cb3273d23bba7f39a9f0c78a0a76f20c052868 100644 (file)
@@ -1,6 +1,6 @@
 ;;; menu-bar.el --- define a default menu bar
 
-;; Copyright (C) 1993-1995, 2000-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1995, 2000-2015 Free Software Foundation, Inc.
 
 ;; Author: Richard M. Stallman
 ;; Maintainer: emacs-devel@gnu.org
 
     (bindings--define-key menu [set-tags-name]
       '(menu-item "Set Tags File Name..." visit-tags-table
-                  :help "Tell Tags commands which tag table file to use"))
+                  :visible (menu-bar-goto-uses-etags-p)
+                  :help "Tell navigation commands which tag table file to use"))
 
     (bindings--define-key menu [separator-tag-file]
-      menu-bar-separator)
+      '(menu-item "--" nil :visible (menu-bar-goto-uses-etags-p)))
 
     (bindings--define-key menu [xref-pop]
-      '(menu-item "Back..." xref-pop-marker-stack
+      '(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]
                   :help "Read a line number and go to that line"))
     menu))
 
+(defun menu-bar-goto-uses-etags-p ()
+  (or (not (boundp 'xref-find-function))
+      (eq xref-find-function 'etags-xref-find)))
 
 (defvar yank-menu (cons (purecopy "Select Yank") nil))
 (fset 'yank-menu (cons 'keymap yank-menu))