From b34d39170b67a7a285f7c8c2ea1b4128b531aad9 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 27 Feb 2021 18:43:20 +0100 Subject: [PATCH] Minor fixes after preloading easymenu * lisp/cedet/ede/dired.el: * lisp/dired-x.el: * lisp/filesets.el: * lisp/follow.el: * lisp/gnus/gnus-registry.el: * lisp/net/eudc.el: * lisp/printing.el: * lisp/recentf.el: * lisp/speedbar.el: Remove redundant require of easymenu; it is now preloaded. * lisp/org/org.el: * lisp/progmodes/antlr-mode.el: * lisp/progmodes/vhdl-mode.el: * lisp/textmodes/reftex.el: Don't require easymenu in Emacs 28 or later. * etc/NEWS: Announce that 'easymenu' is now preloaded. --- etc/NEWS | 3 +++ lisp/cedet/ede/dired.el | 1 - lisp/dired-x.el | 2 -- lisp/filesets.el | 1 - lisp/follow.el | 1 - lisp/gnus/gnus-registry.el | 1 - lisp/net/eudc.el | 2 -- lisp/org/org.el | 3 ++- lisp/printing.el | 1 - lisp/progmodes/antlr-mode.el | 3 ++- lisp/progmodes/vhdl-mode.el | 3 ++- lisp/recentf.el | 1 - lisp/speedbar.el | 1 - lisp/textmodes/reftex.el | 3 ++- 14 files changed, 11 insertions(+), 15 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index cb307675d19..1e950b87dcb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2387,6 +2387,9 @@ This can be used to control whether the defined mode is a command or not, and is useful when defining commands that aren't meant to be used by users directly. +--- +** The 'easymenu' library is now preloaded. + ** The 'values' variable is now obsolete. --- diff --git a/lisp/cedet/ede/dired.el b/lisp/cedet/ede/dired.el index 7eb42ed9de8..8b9eae0b430 100644 --- a/lisp/cedet/ede/dired.el +++ b/lisp/cedet/ede/dired.el @@ -30,7 +30,6 @@ ;;; Code: -(require 'easymenu) (require 'dired) (require 'ede) diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 1199de183fb..5f31bc402ff 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -236,8 +236,6 @@ to nil: a pipe using `zcat' or `gunzip -c' will be used." ;;; MENU BINDINGS -(require 'easymenu) - (when-let ((menu (lookup-key dired-mode-map [menu-bar]))) (easy-menu-add-item menu '("Operate") ["Find Files" dired-do-find-marked-files diff --git a/lisp/filesets.el b/lisp/filesets.el index 2ef13ae8320..a51b6f81358 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -90,7 +90,6 @@ (require 'cl-lib) (require 'seq) -(require 'easymenu) ;;; Some variables diff --git a/lisp/follow.el b/lisp/follow.el index 069758747c1..42e3b60ec42 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -201,7 +201,6 @@ ;;; Code: -(require 'easymenu) (eval-when-compile (require 'cl-lib)) ;;; Variables diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 9a22256113c..e3b9c196186 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -88,7 +88,6 @@ (require 'gnus-art) (require 'gnus-util) (require 'nnmail) -(require 'easymenu) (require 'registry) (defvar gnus-adaptive-word-syntax-table) diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index afdf7c9a439..4f048045d52 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el @@ -1052,8 +1052,6 @@ queries the server for the existing fields and displays a corresponding form." ;;{{{ Menus and keymaps -(require 'easymenu) - (defconst eudc-custom-generated-menu (cdr (custom-menu-create 'eudc))) (defconst eudc-tail-menu diff --git a/lisp/org/org.el b/lisp/org/org.el index fcf02f13299..41898dc2028 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -4757,7 +4757,8 @@ This is for getting out of special buffers like capture.") ;; Other stuff we need. (require 'time-date) (unless (fboundp 'time-subtract) (defalias 'time-subtract 'subtract-time)) -(require 'easymenu) +(when (< emacs-major-version 28) ; preloaded in Emacs 28 + (require 'easymenu)) (require 'org-entities) (require 'org-faces) diff --git a/lisp/printing.el b/lisp/printing.el index 2f234b7b052..f6b9494e177 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -1014,7 +1014,6 @@ Please send all bug fixes and enhancements to (require 'lpr) (require 'ps-print) -(require 'easymenu) (and (string< ps-print-version "6.6.4") (error "`printing' requires `ps-print' package version 6.6.4 or later")) diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index d569bf898c9..8a1d441773a 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -84,7 +84,8 @@ (eval-when-compile (require 'cl-lib)) -(require 'easymenu) +(when (< emacs-major-version 28) ; preloaded in Emacs 28 + (require 'easymenu)) (require 'cc-mode) ;; More compile-time-macros diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index c4de800e332..c8e55da642f 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -2159,7 +2159,8 @@ your style, only those that are different from the default.") ;; mandatory (require 'compile) ; XEmacs -(require 'easymenu) +(when (< emacs-major-version 28) ; preloaded in Emacs 28 + (require 'easymenu)) (require 'hippie-exp) ;; optional (minimize warning messages during compile) diff --git a/lisp/recentf.el b/lisp/recentf.el index d39a523289f..48b8e2b6719 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -37,7 +37,6 @@ ;; ;;; Code: -(require 'easymenu) (require 'tree-widget) (require 'timer) diff --git a/lisp/speedbar.el b/lisp/speedbar.el index d64c72184ea..0e2a3749bef 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -106,7 +106,6 @@ ;;; TODO: ;; - Timeout directories we haven't visited in a while. -(require 'easymenu) (require 'dframe) (require 'ezimage) diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index be9b23677cb..269d676c2bc 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -51,7 +51,8 @@ ;;; Code: (eval-when-compile (require 'cl-lib)) -(require 'easymenu) +(when (< emacs-major-version 28) ; preloaded in Emacs 28 + (require 'easymenu)) (defvar reftex-tables-dirty t "Flag showing if tables need to be re-computed.") -- 2.39.2