1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-21 18:23:59 +00:00

Make XEmacs compat aliases easy-menu-{add,remove} obsolete

* lisp/emacs-lisp/easymenu.el (easy-menu-remove, easy-menu-add):
Make XEmacs compat aliases obsolete.
* lisp/allout.el (allout-setup-menubar):
* lisp/cus-edit.el (Custom-mode):
* lisp/gnus/gnus-art.el (gnus-article-edit-mode):
* lisp/gnus/message.el (message-mode):
* lisp/net/sieve.el (sieve-manage-mode):
* lisp/org/org-agenda.el (org-agenda-mode):
* lisp/org/org-table.el (org-table-edit-formulas, orgtbl-mode):
* lisp/org/org.el:
* lisp/progmodes/cperl-mode.el (cperl-mode):
* lisp/progmodes/hideshow.el (hs-minor-mode):
* lisp/progmodes/idlw-help.el (idlwave-help-mode):
* lisp/progmodes/idlw-shell.el (idlwave-shell-mode):
* lisp/progmodes/idlwave.el (idlwave-mode):
* lisp/progmodes/meta-mode.el (meta-common-mode):
* lisp/progmodes/octave.el (octave-mode):
* lisp/progmodes/prolog.el (prolog-menu):
* lisp/progmodes/tcl.el (tcl-mode):
* lisp/speedbar.el (speedbar-reconfigure-keymaps):
* lisp/term.el (term-mode, term-char-mode, term-process-pager):
* lisp/textmodes/dns-mode.el (dns-mode):
* lisp/wid-browse.el (widget-browse-mode): Don't call above
obsolete aliases.
* lisp/cedet/semantic/grammar.el (semantic-grammar-setup-menu-xemacs):
* lisp/mh-e/mh-folder.el (mh-folder-mode):
* lisp/mh-e/mh-identity.el (mh-identity-add-menu):
* lisp/mh-e/mh-letter.el (mh-letter-mode):
* lisp/mh-e/mh-search.el (mh-search-mode):
* lisp/mh-e/mh-show.el (mh-show-mode):
* lisp/obsolete/otodo-mode.el (todo-mode):
* lisp/progmodes/antlr-mode.el (antlr-mode):
* lisp/progmodes/cc-mode.el (c-mode, c++-mode, objc-mode)
(java-mode, idl-mode, pike-mode):
* lisp/progmodes/sql.el (sql-mode, sql-interactive-mode):
* lisp/progmodes/vhdl-mode.el (vhdl-update-mode-menu)
(vhdl-add-source-files-menu, vhdl-mode):
* lisp/textmodes/reftex-index.el (reftex-index-mode)
(reftex-index-phrases-mode):
* lisp/textmodes/reftex-toc.el (reftex-toc-mode):
* lisp/textmodes/reftex.el (reftex-mode): Only call above obsolete
aliases in XEmacs.

* lisp/progmodes/prolog.el (prolog-inferior-menu):
* lisp/erc/erc-menu.el (erc-menu-add, erc-menu-remove): Don't call
above obsolete aliases.  Make obsolete.
* lisp/erc/erc-menu.el (menu, erc-menu-add, erc-menu-remove):
* lisp/progmodes/prolog.el (prolog-inferior-mode): Adjust callers.
* lisp/speedbar.el (speedbar-previous-menu): Make obsolete.
(Bug#44731)
This commit is contained in:
Stefan Kangas 2020-11-24 17:39:11 +01:00
parent e86199bf90
commit affe9b225d
37 changed files with 74 additions and 110 deletions

View File

@ -1621,8 +1621,7 @@ So `allout-post-command-business' should not reactivate it...")
cur)
(while menus
(setq cur (car menus)
menus (cdr menus))
(easy-menu-add cur))))
menus (cdr menus)))))
;;;_ > allout-overlay-preparations
(defun allout-overlay-preparations ()
"Set the properties of the allout invisible-text overlay and others."

View File

@ -1258,7 +1258,8 @@ common grammar menu."
(unless (boundp ',symbol)
(easy-menu-define ,symbol nil
"Grammar Menu" (copy-sequence semantic-grammar-menu)))
(easy-menu-add ,symbol)
(when (featurep 'xemacs)
(easy-menu-add ,symbol))
(let ((,items (cdr ,mode-menu))
(,path (list (car ,symbol))))
(when ,items

View File

@ -5126,7 +5126,6 @@ Erase customizations; set options
Entry to this mode calls the value of `Custom-mode-hook'
if that value is non-nil."
(use-local-map custom-mode-map)
(easy-menu-add Custom-mode-menu)
(setq-local tool-bar-map
(or custom-tool-bar-map
;; Set up `custom-tool-bar-map'.

View File

@ -488,17 +488,14 @@ To implement dynamic menus, either call this from
`menu-bar-update-hook' or use a menu filter."
(easy-menu-add-item map 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
;; here easy-menu-remove and easy-menu-add are a noops.
(defalias 'easy-menu-remove 'ignore
(define-obsolete-function-alias 'easy-menu-remove #'ignore "28.1"
"Remove MENU from the current menu bar.
Contrary to XEmacs, this is a nop on Emacs since menus are automatically
\(de)activated when the corresponding keymap is (de)activated.
\(fn MENU)")
(defalias 'easy-menu-add #'ignore
(define-obsolete-function-alias 'easy-menu-add #'ignore "28.1"
"Add the menu to the menubar.
On Emacs this is a nop, because menus are already automatically
activated when the corresponding keymap is activated. On XEmacs

View File

@ -114,22 +114,19 @@ ERC menu yet.")
;; make sure the menu only gets defined once, since Emacs 22
;; activates it immediately
(easy-menu-define erc-menu erc-mode-map "ERC menu" erc-menu-definition)
(setq erc-menu-defined t))
(erc-menu-add))
((erc-menu-remove)
;; `easy-menu-remove' is a no-op in Emacs 22
(setq erc-menu-defined t)))
(;; `easy-menu-remove' is a no-op in Emacs 22
(message "You might have to restart Emacs to remove the ERC menu")))
;; silence byte-compiler warning
(defvar erc-menu)
(defun erc-menu-add ()
"Add the ERC menu to the current buffer."
(easy-menu-add erc-menu erc-mode-map))
(declare (obsolete nil "28.1"))
nil)
(defun erc-menu-remove ()
"Remove the ERC menu from the current buffer."
(easy-menu-remove erc-menu))
(declare (obsolete nil "28.1"))
nil)
(provide 'erc-menu)

View File

@ -7251,7 +7251,6 @@ This is an extended text-mode.
'(message-font-lock-keywords t))
(set (make-local-variable 'mail-header-separator) "")
(set (make-local-variable 'gnus-article-edit-mode) t)
(easy-menu-add message-mode-field-menu message-mode-map)
(mml-mode)
(setq buffer-read-only nil)
(buffer-enable-undo)

View File

@ -3109,8 +3109,6 @@ Like `text-mode', but with these additional commands:
'(message-font-lock-keywords t))
(if (boundp 'tool-bar-map)
(set (make-local-variable 'tool-bar-map) (message-make-tool-bar)))
(easy-menu-add message-mode-menu message-mode-map)
(easy-menu-add message-mode-field-menu message-mode-map)
;; Mmmm... Forbidden properties...
(add-hook 'after-change-functions #'message-strip-forbidden-properties
nil 'local)

View File

@ -656,9 +656,10 @@ perform the operation on all messages in that region.
(mh-funcall-if-exists hl-line-mode 1)
(setq revert-buffer-function 'mh-undo-folder)
(add-to-list 'minor-mode-alist '(mh-showing-mode " Show"))
(easy-menu-add mh-folder-sequence-menu)
(easy-menu-add mh-folder-message-menu)
(easy-menu-add mh-folder-folder-menu)
(mh-do-in-xemacs
(easy-menu-add mh-folder-sequence-menu)
(easy-menu-add mh-folder-message-menu)
(easy-menu-add mh-folder-folder-menu))
(mh-inc-spool-make)
(mh-set-help mh-folder-mode-help-messages)
(if (and (featurep 'xemacs)

View File

@ -91,7 +91,7 @@ See `mh-identity-add-menu'."
"Add the current Identity menu.
See `mh-identity-make-menu'."
(if mh-identity-menu
(easy-menu-add mh-identity-menu)))
(mh-do-in-xemacs (easy-menu-add mh-identity-menu))))
(defvar mh-identity-local nil
"Buffer-local variable that holds the identity currently in use.")

View File

@ -330,7 +330,7 @@ order).
(t
;; ...or the header only
(setq font-lock-defaults '((mh-show-font-lock-keywords) t))))
(easy-menu-add mh-letter-menu)
(mh-do-in-xemacs (easy-menu-add mh-letter-menu))
;; Maybe we want to use the existing Mail menu from mail-mode in
;; 9.0; in the mean time, let's remove it since the redundancy will
;; only produce confusion.

View File

@ -618,7 +618,7 @@ The hook `mh-search-mode-hook' is called upon entry to this mode.
\\{mh-search-mode-map}"
(easy-menu-add mh-pick-menu)
(mh-do-in-xemacs (easy-menu-add mh-pick-menu))
(mh-set-help mh-search-mode-help-messages))

View File

@ -863,9 +863,10 @@ See also `mh-folder-mode'.
(when mh-decode-mime-flag
(mh-make-local-hook 'kill-buffer-hook)
(add-hook 'kill-buffer-hook 'mh-mime-cleanup nil t))
(easy-menu-add mh-show-sequence-menu)
(easy-menu-add mh-show-message-menu)
(easy-menu-add mh-show-folder-menu)
(mh-do-in-xemacs
(easy-menu-add mh-show-sequence-menu)
(easy-menu-add mh-show-message-menu)
(easy-menu-add mh-show-folder-menu))
(make-local-variable 'mh-show-folder-buffer)
(buffer-disable-undo)
(use-local-map mh-show-mode-map))

View File

@ -143,8 +143,7 @@ require \"fileinto\";
(define-derived-mode sieve-manage-mode special-mode "Sieve-manage"
"Mode used for sieve script management."
(buffer-disable-undo (current-buffer))
(setq truncate-lines t)
(easy-menu-add sieve-manage-mode-menu sieve-manage-mode-map))
(setq truncate-lines t))
;; Commands used in sieve-manage mode:

View File

@ -923,7 +923,8 @@ If INCLUDE-SEP is non-nil, return point after the separator."
;;;###autoload
(define-derived-mode todo-mode nil "TODO"
"Major mode for editing TODO lists."
(easy-menu-add todo-menu))
(when (featurep 'xemacs)
(easy-menu-add todo-menu)))
(with-suppressed-warnings ((lexical date entry))
(defvar date)

View File

@ -2236,7 +2236,6 @@ The following commands are available:
(setq mode-name "Org-Agenda")
(setq indent-tabs-mode nil)
(use-local-map org-agenda-mode-map)
(easy-menu-add org-agenda-menu)
(when org-startup-truncated (setq truncate-lines t))
(setq-local line-move-visual nil)
(add-hook 'post-command-hook 'org-agenda-update-agenda-type nil 'local)

View File

@ -3287,7 +3287,6 @@ Parameters get priority."
(setq-local org-selected-window sel-win)
(use-local-map org-table-fedit-map)
(add-hook 'post-command-hook #'org-table-fedit-post-command t t)
(easy-menu-add org-table-fedit-menu)
(setq startline (org-current-line))
(dolist (entry eql)
(let* ((type (cond
@ -5129,15 +5128,13 @@ When LOCAL is non-nil, show references for the table at point."
orgtbl-line-start-regexp))
(when (fboundp 'font-lock-add-keywords)
(font-lock-add-keywords nil orgtbl-extra-font-lock-keywords)
(org-restart-font-lock))
(easy-menu-add orgtbl-mode-menu))
(org-restart-font-lock)))
(t
(setq auto-fill-inhibit-regexp org-old-auto-fill-inhibit-regexp)
(remove-hook 'before-change-functions 'org-before-change-function t)
(when (fboundp 'font-lock-remove-keywords)
(font-lock-remove-keywords nil orgtbl-extra-font-lock-keywords)
(org-restart-font-lock))
(easy-menu-remove orgtbl-mode-menu)
(force-mode-line-update 'all))))
(defun orgtbl-make-binding (fun n &rest keys)

View File

@ -4791,7 +4791,6 @@ This is for getting out of special buffers like capture.")
(require 'time-date)
(unless (fboundp 'time-subtract) (defalias 'time-subtract 'subtract-time))
(require 'easymenu)
(autoload 'easy-menu-add "easymenu")
(require 'overlay)
;; (require 'org-macs) moved higher up in the file before it is first used

View File

@ -2592,7 +2592,8 @@ the default language."
comment-start-skip "/\\*+ *\\|// *")
;; various -----------------------------------------------------------------
(set (make-local-variable 'font-lock-defaults) antlr-font-lock-defaults)
(easy-menu-add antlr-mode-menu)
(when (featurep 'xemacs)
(easy-menu-add antlr-mode-menu))
(set (make-local-variable 'imenu-create-index-function)
'antlr-imenu-create-index-function)
(set (make-local-variable 'imenu-generic-expression) t) ; fool stupid test

View File

@ -2597,7 +2597,8 @@ Key bindings:
(setq abbrev-mode t)
(c-init-language-vars-for 'c-mode)
(c-common-init 'c-mode)
(easy-menu-add c-c-menu)
(when (featurep 'xemacs)
(easy-menu-add c-c-menu))
(cc-imenu-init cc-imenu-c-generic-expression)
(add-hook 'flymake-diagnostic-functions 'flymake-cc nil t)
(c-run-mode-hooks 'c-mode-common-hook))
@ -2688,7 +2689,8 @@ Key bindings:
(setq abbrev-mode t)
(c-init-language-vars-for 'c++-mode)
(c-common-init 'c++-mode)
(easy-menu-add c-c++-menu)
(when (featurep 'xemacs)
(easy-menu-add c-c++-menu))
(cc-imenu-init cc-imenu-c++-generic-expression)
(add-hook 'flymake-diagnostic-functions 'flymake-cc nil t)
(c-run-mode-hooks 'c-mode-common-hook))
@ -2735,7 +2737,8 @@ Key bindings:
(setq abbrev-mode t)
(c-init-language-vars-for 'objc-mode)
(c-common-init 'objc-mode)
(easy-menu-add c-objc-menu)
(when (featurep 'xemacs)
(easy-menu-add c-objc-menu))
(cc-imenu-init nil 'cc-imenu-objc-function)
(c-run-mode-hooks 'c-mode-common-hook))
@ -2785,7 +2788,8 @@ Key bindings:
(setq abbrev-mode t)
(c-init-language-vars-for 'java-mode)
(c-common-init 'java-mode)
(easy-menu-add c-java-menu)
(when (featurep 'xemacs)
(easy-menu-add c-java-menu))
(cc-imenu-init cc-imenu-java-generic-expression)
(c-run-mode-hooks 'c-mode-common-hook))
@ -2827,7 +2831,8 @@ Key bindings:
(c-initialize-cc-mode t)
(c-init-language-vars-for 'idl-mode)
(c-common-init 'idl-mode)
(easy-menu-add c-idl-menu)
(when (featurep 'xemacs)
(easy-menu-add c-idl-menu))
;;(cc-imenu-init cc-imenu-idl-generic-expression) ;TODO
(c-run-mode-hooks 'c-mode-common-hook))
@ -2872,7 +2877,8 @@ Key bindings:
(setq abbrev-mode t)
(c-init-language-vars-for 'pike-mode)
(c-common-init 'pike-mode)
(easy-menu-add c-pike-menu)
(when (featurep 'xemacs)
(easy-menu-add c-pike-menu))
;;(cc-imenu-init cc-imenu-pike-generic-expression) ;TODO
(c-run-mode-hooks 'c-mode-common-hook))

View File

@ -1718,8 +1718,6 @@ or as help on variables `cperl-tips', `cperl-problems',
(and (boundp 'msb-menu-cond)
(not cperl-msb-fixed)
(cperl-msb-fix))
(if (fboundp 'easy-menu-add)
(easy-menu-add cperl-menu)) ; A NOP in Emacs.
(if cperl-hook-after-change
(add-hook 'after-change-functions #'cperl-after-change-function nil t))
;; After hooks since fontification will break this

View File

@ -948,7 +948,6 @@ Key bindings:
(add-hook 'change-major-mode-hook
#'turn-off-hideshow
nil t)
(easy-menu-add hs-minor-mode-menu)
(set (make-local-variable 'line-move-ignore-invisible) t)
(add-to-invisibility-spec '(hs . t)))
(remove-from-invisibility-spec '(hs . t))

View File

@ -306,7 +306,6 @@ Jump: [h] to function doclib header
Here are all keybindings.
\\{idlwave-help-mode-map}"
(buffer-disable-undo)
(easy-menu-add idlwave-help-menu idlwave-help-mode-map)
(setq truncate-lines t)
(setq case-fold-search t)
(setq mode-line-format

View File

@ -954,7 +954,6 @@ IDL has currently stepped.")
nil 'local)
(add-hook 'kill-buffer-hook 'idlwave-shell-delete-temp-files nil 'local)
(add-hook 'kill-emacs-hook 'idlwave-shell-delete-temp-files)
(easy-menu-add idlwave-shell-mode-menu idlwave-shell-mode-map)
;; Set the optional comint variables
(when idlwave-shell-comint-settings
@ -4334,13 +4333,6 @@ Shell debugging commands are available as single key sequences."
(easy-menu-define
idlwave-shell-mode-menu idlwave-shell-mode-map "IDL shell menus"
idlwave-shell-menu-def)
(save-current-buffer
(dolist (buf (buffer-list))
(set-buffer buf)
(if (derived-mode-p 'idlwave-mode)
(progn
(easy-menu-remove idlwave-mode-debug-menu)
(easy-menu-add idlwave-mode-debug-menu)))))
;; The Breakpoint Glyph -------------------------------------------------------

View File

@ -1873,10 +1873,6 @@ The main features of this mode are
(set (make-local-variable 'indent-tabs-mode) nil)
(set (make-local-variable 'completion-ignore-case) t)
(when (featurep 'easymenu)
(easy-menu-add idlwave-mode-menu idlwave-mode-map)
(easy-menu-add idlwave-mode-debug-menu idlwave-mode-map))
(setq abbrev-mode t)
(set (make-local-variable idlwave-fill-function) 'idlwave-auto-fill)

View File

@ -946,10 +946,7 @@ The environment marked is the one that contains point or follows point."
(set (make-local-variable 'font-lock-defaults)
'(meta-font-lock-keywords
nil nil ((?_ . "w")) nil
(font-lock-comment-start-regexp . "%")))
;; Activate syntax table, keymap and menu.
(easy-menu-add meta-mode-menu))
(font-lock-comment-start-regexp . "%"))))
;;;###autoload

View File

@ -619,9 +619,7 @@ Key bindings:
(add-hook 'before-save-hook 'octave-sync-function-file-names nil t)
(setq-local beginning-of-defun-function 'octave-beginning-of-defun)
(and octave-font-lock-texinfo-comment (octave-font-lock-texinfo-comment))
(add-hook 'eldoc-documentation-functions 'octave-eldoc-function nil t)
(easy-menu-add octave-mode-menu))
(add-hook 'eldoc-documentation-functions 'octave-eldoc-function nil t))
(defcustom inferior-octave-program "octave"

View File

@ -1292,8 +1292,7 @@ To find out what version of Prolog mode you are running, enter
(setq-local shell-dirstack-query "pwd.")
(setq-local compilation-error-regexp-alist
prolog-inferior-error-regexp-alist)
(compilation-shell-minor-mode)
(prolog-inferior-menu))
(compilation-shell-minor-mode))
(defun prolog-input-filter (str)
(cond ((string-match "\\`\\s *\\'" str) nil) ;whitespace
@ -3378,9 +3377,6 @@ PREFIX is the prefix of the search regexp."
(defun prolog-menu ()
"Add the menus for the Prolog editing buffers."
(easy-menu-add prolog-edit-menu-insert-move)
(easy-menu-add prolog-edit-menu-runtime)
;; Add predicate index menu
(setq-local imenu-create-index-function
'imenu-default-create-index-function)
@ -3391,9 +3387,7 @@ PREFIX is the prefix of the search regexp."
(if (and prolog-imenu-flag
(< (count-lines (point-min) (point-max)) prolog-imenu-max-lines))
(imenu-add-to-menubar "Predicates"))
(easy-menu-add prolog-menu-help))
(imenu-add-to-menubar "Predicates")))
(easy-menu-define
prolog-inferior-menu-all prolog-inferior-mode-map
@ -3436,8 +3430,8 @@ PREFIX is the prefix of the search regexp."
"Create the menus for the Prolog inferior buffer.
This menu is dynamically created because one may change systems during
the life of an Emacs session."
(easy-menu-add prolog-inferior-menu-all)
(easy-menu-add prolog-menu-help))
(declare (obsolete nil "28.1"))
nil)
(defun prolog-mode-version ()
"Echo the current version of Prolog mode in the minibuffer."

View File

@ -4186,8 +4186,9 @@ must tell Emacs. Here's how to do that in your init file:
(modify-syntax-entry ?\\\\ \"\\\\\" sql-mode-syntax-table)))"
:abbrev-table sql-mode-abbrev-table
(if sql-mode-menu
(easy-menu-add sql-mode-menu)); XEmacs
(when (and (featurep 'xemacs)
sql-mode-menu)
(easy-menu-add sql-mode-menu))
;; (smie-setup sql-smie-grammar #'sql-smie-rules)
(set (make-local-variable 'comment-start) "--")
@ -4312,8 +4313,9 @@ you entered, right above the output it created.
(setq mode-name
(concat "SQLi[" (or (sql-get-product-feature sql-product :name)
(symbol-name sql-product)) "]"))
(if sql-interactive-mode-menu
(easy-menu-add sql-interactive-mode-menu)) ; XEmacs
(when (and (featurep 'xemacs)
sql-interactive-mode-menu)
(easy-menu-add sql-interactive-mode-menu))
;; Note that making KEYWORDS-ONLY nil will cause havoc if you try
;; SELECT 'x' FROM DUAL with SQL*Plus, because the title of the column

View File

@ -654,9 +654,7 @@ already exist."
#'tcl-add-log-defun)
(setq-local beginning-of-defun-function #'tcl-beginning-of-defun-function)
(setq-local end-of-defun-function #'tcl-end-of-defun-function)
(easy-menu-add tcl-mode-menu))
(setq-local end-of-defun-function #'tcl-end-of-defun-function))

View File

@ -4205,9 +4205,11 @@ STRING are replaced by `-' and substrings are converted to lower case."
(defun vhdl-update-mode-menu ()
"Update VHDL Mode menu."
(interactive)
(easy-menu-remove vhdl-mode-menu-list) ; for XEmacs
(when (featurep 'xemacs)
(easy-menu-remove vhdl-mode-menu-list))
(setq vhdl-mode-menu-list (vhdl-create-mode-menu))
(easy-menu-add vhdl-mode-menu-list) ; for XEmacs
(when (featurep 'xemacs)
(easy-menu-add vhdl-mode-menu-list))
(easy-menu-define vhdl-mode-menu vhdl-mode-map
"Menu keymap for VHDL Mode." vhdl-mode-menu-list))
@ -4313,7 +4315,8 @@ The directory of the current source file is scanned."
(push ["*Rescan*" vhdl-add-source-files-menu t] menu-list)
(push "Sources" menu-list)
;; Create menu
(easy-menu-add menu-list)
(when (featurep 'xemacs)
(easy-menu-add menu-list))
(easy-menu-define vhdl-sources-menu newmap
"VHDL source files menu" menu-list))
(message ""))
@ -4926,7 +4929,8 @@ Key bindings:
;; add source file menu
(if vhdl-source-file-menu (vhdl-add-source-files-menu))
;; add VHDL menu
(easy-menu-add vhdl-mode-menu-list) ; for XEmacs
(when (featurep 'xemacs)
(easy-menu-add vhdl-mode-menu-list))
(easy-menu-define vhdl-mode-menu vhdl-mode-map
"Menu keymap for VHDL Mode." vhdl-mode-menu-list)
;; initialize hideshow and add menu

View File

@ -1144,6 +1144,7 @@ frame and window to be the currently active frame and window."
(defvar speedbar-previous-menu nil
"The menu before the last `speedbar-reconfigure-keymaps' was called.")
(make-obsolete-variable 'speedbar-previous-menu "no longer used." "28.1")
(defun speedbar-reconfigure-keymaps ()
"Reconfigure the menu-bar in a speedbar frame.
@ -1195,10 +1196,7 @@ and the existence of packages."
(speedbar-initial-keymap)
;; This creates a small keymap we can glom the
;; menu adjustments into.
(speedbar-make-specialized-keymap)))
;; Delete the old menu if applicable.
(if speedbar-previous-menu (easy-menu-remove speedbar-previous-menu))
(setq speedbar-previous-menu md)
(speedbar-make-specialized-keymap)))
;; Now add the new menu
(easy-menu-define speedbar-menu-map (current-local-map)
"Speedbar menu" md))

View File

@ -1107,8 +1107,6 @@ Entry to this mode runs the hooks on `term-mode-hook'."
(term--reset-scroll-region)
(easy-menu-add term-terminal-menu)
(easy-menu-add term-signals-menu)
(or term-input-ring
(setq term-input-ring (make-ring term-input-ring-size)))
(term-update-mode-line))
@ -1293,8 +1291,6 @@ intervention from Emacs, except for the escape character (usually C-c)."
(when (term-in-line-mode)
(setq term-old-mode-map (current-local-map))
(use-local-map term-raw-map)
(easy-menu-add term-terminal-menu)
(easy-menu-add term-signals-menu)
;; Don't allow changes to the buffer or to point which are not
;; caused by the process filter.
@ -3550,9 +3546,6 @@ The top-most line is line 0."
;; (stop-process process))
(setq term-pager-old-local-map (current-local-map))
(use-local-map term-pager-break-map)
(easy-menu-add term-terminal-menu)
(easy-menu-add term-signals-menu)
(easy-menu-add term-pager-menu)
(make-local-variable 'term-old-mode-line-format)
(setq term-old-mode-line-format mode-line-format)
(setq mode-line-format

View File

@ -184,8 +184,7 @@ Turning on DNS mode runs `dns-mode-hook'."
(set (make-local-variable 'font-lock-defaults)
'(dns-mode-font-lock-keywords nil nil ((?_ . "w"))))
(add-hook 'before-save-hook 'dns-mode-soa-maybe-increment-serial
nil t)
(easy-menu-add dns-mode-menu dns-mode-map))
nil t))
;;;###autoload (defalias 'zone-mode 'dns-mode)

View File

@ -408,7 +408,8 @@ Here are all local bindings.
(make-local-hook 'post-command-hook)
(make-local-hook 'pre-command-hook))
(make-local-variable 'reftex-last-follow-point)
(easy-menu-add reftex-index-menu reftex-index-mode-map)
(when (featurep 'xemacs)
(easy-menu-add reftex-index-menu reftex-index-mode-map))
(add-hook 'post-command-hook 'reftex-index-post-command-hook nil t)
(add-hook 'pre-command-hook 'reftex-index-pre-command-hook nil t))
@ -1386,7 +1387,8 @@ Here are all local bindings.
:syntax-table reftex-index-phrases-syntax-table
(set (make-local-variable 'font-lock-defaults)
reftex-index-phrases-font-lock-defaults)
(easy-menu-add reftex-index-phrases-menu reftex-index-phrases-mode-map)
(when (featurep 'xemacs)
(easy-menu-add reftex-index-phrases-menu reftex-index-phrases-mode-map))
(set (make-local-variable 'reftex-index-phrases-marker) (make-marker)))
;; (add-hook 'reftex-index-phrases-mode-hook 'turn-on-font-lock)

View File

@ -153,7 +153,8 @@ Here are all local bindings.
(make-local-variable 'reftex-last-follow-point)
(add-hook 'post-command-hook 'reftex-toc-post-command-hook nil t)
(add-hook 'pre-command-hook 'reftex-toc-pre-command-hook nil t)
(easy-menu-add reftex-toc-menu reftex-toc-mode-map))
(when (featurep 'xemacs)
(easy-menu-add reftex-toc-menu reftex-toc-mode-map)))
(defvar reftex-last-toc-file nil
"Stores the file name from which `reftex-toc' was called. For redo command.")

View File

@ -207,7 +207,8 @@ on the menu bar.
(if reftex-mode
(progn
;; Mode was turned on
(easy-menu-add reftex-mode-menu)
(when (featurep 'xemacs)
(easy-menu-add reftex-mode-menu))
(and reftex-plug-into-AUCTeX
(reftex-plug-into-AUCTeX))
(unless (get 'reftex-auto-view-crossref 'initialized)
@ -224,7 +225,8 @@ on the menu bar.
(run-hooks 'reftex-mode-hook))
;; Mode was turned off
(easy-menu-remove reftex-mode-menu)))
(when (featurep 'xemacs)
(easy-menu-remove reftex-mode-menu))))
(defvar reftex-docstruct-symbol)
(defun reftex-kill-buffer-hook ()

View File

@ -77,8 +77,6 @@ if that value is non-nil."
(setq major-mode 'widget-browse-mode
mode-name "Widget")
(use-local-map widget-browse-mode-map)
(easy-menu-add widget-browse-mode-customize-menu)
(easy-menu-add widget-browse-mode-menu)
(run-mode-hooks 'widget-browse-mode-hook))
(put 'widget-browse-mode 'mode-class 'special)