changeset 4114:5746e25610f8

(revert-buffer): Make menu-enable form more accurate using revert-buffer-function and verify-visited-file-modtime. (menu-bar-help-menu): Put back under global-map. (menu-bar-final-items): Set it.
author Richard M. Stallman <rms@gnu.org>
date Sat, 17 Jul 1993 01:43:00 +0000
parents 93d42767e2ec
children 4aafcdc3d9e7
files lisp/menu-bar.el
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/menu-bar.el	Sat Jul 17 00:18:04 1993 +0000
+++ b/lisp/menu-bar.el	Sat Jul 17 01:43:00 1993 +0000
@@ -25,9 +25,9 @@
 
 (define-key global-map [menu-bar] (make-sparse-keymap "menu-bar"))
 (defvar menu-bar-help-menu (make-sparse-keymap "Help"))
-;; Put Help item in help-menu-bar-map so it always goes last.
-(setq help-menu-bar-map (make-sparse-keymap))
-(define-key help-menu-bar-map [help] (cons "Help" menu-bar-help-menu))
+;; Put Help item last.
+(setq menu-bar-final-items '(help))
+(define-key global-map [menu-bar help] (cons "Help" menu-bar-help-menu))
 (defvar menu-bar-edit-menu (make-sparse-keymap "Edit"))
 (define-key global-map [menu-bar edit] (cons "Edit" menu-bar-edit-menu))
 (defvar menu-bar-file-menu (make-sparse-keymap "File"))
@@ -103,7 +103,10 @@
     (> count 1)))
 
 (put 'save-buffer 'menu-enable '(buffer-modified-p))
-(put 'revert-buffer 'menu-enable '(and (buffer-modified-p) (buffer-file-name)))
+(put 'revert-buffer 'menu-enable
+     '(or revert-buffer-function revert-buffer-insert-file-contents-function
+	  (and (buffer-file-name)
+	       (not (verify-visited-file-modtime (current-buffer))))))
 (put 'delete-frame 'menu-enable '(cdr (visible-frame-list)))
 (put 'kill-this-buffer 'menu-enable '(kill-this-buffer-enabled-p))