From efc13f4638e8f5eff09da00c3e8a58d7a5542c98 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Apr 2003 23:15:47 +0000 Subject: [PATCH] (easy-menu-define): Don't make a defvar for nil. (easy-menu-convert-item-1): Doc fix. (easy-menu-change): Call easy-menu-create-menu. --- lisp/ChangeLog | 37 +++++++++++++++++++++++++++++++++---- lisp/emacs-lisp/easymenu.el | 14 ++++---------- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b84ba450eaf..4aac41b648b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,33 @@ +2003-04-03 Richard M. Stallman + + * emacs-lisp/easymenu.el (easy-menu-define): + Don't make a defvar for nil. + (easy-menu-convert-item-1): Doc fix. + (easy-menu-change): Call easy-menu-create-menu. + + * subr.el (read-quoted-char): Remember the input char + before translation thru function-key-map, and use that for unreading. + + * shadowfile.el (shadow-parse-fullname): + Renamed from shadow-parse-fullpath. + (shadow-parse-name): Renamed from shadow-parse-path. + (shadow-make-fullname): Renamed from shadow-make-fullpath. + (shadow-replace-name-component): Was shadow-replace-path-component. + Callers of the above functions changed. + (shadow-expand-cluster-in-file-name): Doc fix. + (shadow-same-site, shadow-file-match): Doc fix. + (shadow-define-literal-group): Doc fix. + + * kmacro.el (kmacro-end-and-call-macro): Doc fix. + + * hexl.el (hexl-find-file): Ignore user's value of default-major-mode. + + * files.el (hack-local-variables-prop-line): New arg MODE-ONLY. + (hack-local-variables): When MODE-ONLY is set, pass it along to + hack-local-variables-prop-line. + + * delsel.el (delete-active-region): Don't explicitly deactivate mark. + 2003-04-03 Masatake YAMATO * progmodes/etags.el: Require button.el. @@ -221,9 +251,8 @@ 2003-03-26 Steve Youngs - * em-unix.el (eshell-plain-locate-behavior): Make the default the - return value of `eshell-under-xemacs-p', ie, nil for GNU/Emacs and - non-nil for XEmacs. + * em-unix.el (eshell-plain-locate-behavior): Make the default + nil on Emacs, t on XEmacs. 2003-03-25 Stefan Monnier @@ -3723,7 +3752,7 @@ are output with gdba in gdb-ui.el. (tooltip-strip-annotations): New function. -2002-12-29 Dave Love +2002-11-29 Dave Love * autoarg.el (autoarg-mode): Give it a :group. diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index 3458dfdff86..5779cd2b9d6 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el @@ -148,7 +148,7 @@ as a solid horizontal line. A menu item can be a list with the same format as MENU. This is a submenu." `(progn - (defvar ,symbol nil ,doc) + ,(if symbol `(defvar ,symbol nil ,doc)) (easy-menu-do-define (quote ,symbol) ,maps ,doc ,menu))) ;;;###autoload @@ -266,14 +266,8 @@ would always fail because the key is `equal' but not `eq'." easy-menu-converted-items-table))) (defun easy-menu-convert-item-1 (item) - "Parse an item description and add the item to a keymap. -This is the function that is used for item definition by the other easy-menu -functions. -MENU is a sparse keymap i.e. a list starting with the symbol `keymap'. -ITEM defines an item as in `easy-menu-define'. -Optional argument BEFORE is nil or a key in MENU. If BEFORE is not nil -put item before BEFORE in MENU, otherwise if item is already present in -MENU, just change it, otherwise put it last in MENU." + "Parse an item description and convert it to a menu keymap element. +ITEM defines an item as in `easy-menu-define'." (let (name command label prop remove help) (cond ((stringp item) ; An item or separator. @@ -460,7 +454,7 @@ the submenu named BEFORE, otherwise add it at the end of the menu. Either call this from `menu-bar-update-hook' or use a menu filter, to implement dynamic menus." - (easy-menu-add-item nil path (cons name items) before)) + (easy-menu-add-item nil path (easy-menu-create-menu name items) before)) ;; XEmacs needs the following two functions to add and remove menus. ;; In Emacs this is done automatically when switching keymaps, so -- 2.39.2