]> code.delx.au - gnu-emacs/blobdiff - lisp/menu-bar.el
* files.el (basic-save-buffer-1): Don't set buffer-file-coding-system-explicit.
[gnu-emacs] / lisp / menu-bar.el
index 619510e8833014d2da7b3783f4f705d10a741f10..60f2bc2999f878b43f39357c4936c008bd3520ff 100644 (file)
@@ -1,6 +1,6 @@
 ;;; menu-bar.el --- define a default menu bar
 
-;; Copyright (C) 1993-1995, 2000-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1995, 2000-2013 Free Software Foundation, Inc.
 
 ;; Author: RMS
 ;; Maintainer: FSF
@@ -637,11 +637,11 @@ FNAME is the minor mode's name (variable and function).
 DOC is the text to use for the menu entry.
 HELP is the text to use for the tooltip.
 PROPS are additional properties."
-  `(list 'menu-item ,doc ',fname
-        ,@(mapcar (lambda (p) (list 'quote p)) props)
-        :help ,help
-        :button '(:toggle . (and (default-boundp ',fname)
-                                 (default-value ',fname)))))
+  `'(menu-item ,doc ,fname
+              ,@props
+              :help ,help
+              :button (:toggle . (and (default-boundp ',fname)
+                                      (default-value ',fname)))))
 
 (defmacro menu-bar-make-toggle (name variable doc message help &rest body)
   `(progn
@@ -664,10 +664,10 @@ by \"Save Options\" in Custom buffers.")
        ;; a candidate for "Save Options", and we do not want to save options
        ;; the user have already set explicitly in his init file.
        (if interactively (customize-mark-as-set ',variable)))
-     (list 'menu-item ,doc ',name
-          :help ,help
-          :button '(:toggle . (and (default-boundp ',variable)
-                                   (default-value ',variable))))))
+     '(menu-item ,doc ,name
+                :help ,help
+                :button (:toggle . (and (default-boundp ',variable)
+                                        (default-value ',variable))))))
 
 ;; Function for setting/saving default font.
 
@@ -1490,8 +1490,6 @@ mail status in mode line"))
     (bindings--define-key menu [separator-vc]
       menu-bar-separator)
 
-    (bindings--define-key menu [pcl-cvs]
-      '(menu-item "PCL-CVS" cvs-global-menu))
     (bindings--define-key menu [vc] nil) ;Create the place for the VC menu.
 
     (bindings--define-key menu [separator-compare]
@@ -1639,8 +1637,8 @@ key, a click, or a menu-item"))
       '(menu-item "Find Options by Value..." apropos-value
                   :help "Find variables whose values match a regexp"))
     (bindings--define-key menu [find-options-by-name]
-      '(menu-item "Find Options by Name..." apropos-variable
-                  :help "Find variables whose names match a regexp"))
+      '(menu-item "Find Options by Name..." apropos-user-option
+                  :help "Find user options whose names match a regexp"))
     (bindings--define-key menu [find-commands-by-name]
       '(menu-item "Find Commands by Name..." apropos-command
                   :help "Find commands whose names match a regexp"))
@@ -1814,9 +1812,14 @@ for the definition of the menu frame."
 When called in the minibuffer, get out of the minibuffer
 using `abort-recursive-edit'."
   (interactive)
-  (if (menu-bar-non-minibuffer-window-p)
-      (kill-buffer (current-buffer))
-    (abort-recursive-edit)))
+  (cond
+   ;; Don't do anything when `menu-frame' is not alive or visible
+   ;; (Bug#8184).
+   ((not (menu-bar-menu-frame-live-and-visible-p)))
+   ((menu-bar-non-minibuffer-window-p)
+    (kill-buffer (current-buffer)))
+   (t
+    (abort-recursive-edit))))
 
 (defun kill-this-buffer-enabled-p ()
   "Return non-nil if the `kill-this-buffer' menu item should be enabled."