From 0258af72362dda7762b9370823e501480802df18 Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Thu, 22 Aug 2024 18:19:25 +0200 Subject: More portable syntax for menus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ebuild-mode.el (ebuild-mode-menu): Drop :active keyword because the three-element vector form of menu items is more portable. (ebuild-repo-mode-menu): Rename menu bar item to "Ebuild-Repo". Replace :visible keyword by :included; XEmacs 21.4 doesn't know the former. Signed-off-by: Ulrich Müller --- ChangeLog | 6 ++++++ ebuild-mode.el | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 314685d..f8f2a4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-08-22 Ulrich Müller + * ebuild-mode.el (ebuild-mode-menu): Drop :active keyword because + the three-element vector form of menu items is more portable. + (ebuild-repo-mode-menu): Rename menu bar item to "Ebuild-Repo". + Replace :visible keyword by :included; XEmacs 21.4 doesn't know + the former. + * ebuild-mode.el (ebuild-mode-update-copyright): Save match data, replace-match in XEmacs 21.4 clobbers it. diff --git a/ebuild-mode.el b/ebuild-mode.el index 0ef75b0..302e271 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -1066,24 +1066,24 @@ in a Gentoo profile." "Menu for `ebuild-mode'." `("Ebuild" ["Run ebuild command" ebuild-run-command - :active (eq major-mode 'ebuild-mode)] + (eq major-mode 'ebuild-mode)] ("ebuild commands" - :active (eq major-mode 'ebuild-mode) ,@(mapcar (lambda (c) - (vector c (intern (concat "ebuild-run-command-" c)))) + (vector c (intern (concat "ebuild-run-command-" c)) + '(eq major-mode 'ebuild-mode))) ebuild-commands-list)) ["Run pkgdev command" ebuild-mode-run-pkgdev] ["Run pkgcheck command" ebuild-mode-run-pkgcheck] ["Find working directory (WORKDIR)" ebuild-mode-find-workdir - :active (eq major-mode 'ebuild-mode)] + (eq major-mode 'ebuild-mode)] ["Find build directory (S)" ebuild-mode-find-s - :active (eq major-mode 'ebuild-mode)] + (eq major-mode 'ebuild-mode)] ["Find image directory (D)" ebuild-mode-find-image-dir - :active (eq major-mode 'ebuild-mode)] + (eq major-mode 'ebuild-mode)] ["Find build log" ebuild-mode-find-build-log - :active (eq major-mode 'ebuild-mode)] + (eq major-mode 'ebuild-mode)] ["Insert ebuild skeleton" ebuild-mode-insert-skeleton - :active (eq major-mode 'ebuild-mode)] + (eq major-mode 'ebuild-mode)] ["Set/unset keyword" ebuild-mode-keyword] ["Set/unset keywords (ekeyword syntax)" ebuild-mode-ekeyword] ["Mark all keywords as unstable" ebuild-mode-all-keywords-unstable] @@ -1091,9 +1091,9 @@ in a Gentoo profile." (easy-menu-define ebuild-repo-mode-menu ebuild-repo-mode-map "Menu for `ebuild-repo-mode'." - '("Ebuild" + '("Ebuild-Repo" ;; show the menu only for conf files - :visible (derived-mode-p 'conf-unix-mode) + :included (derived-mode-p 'conf-unix-mode) ["Insert package.mask tag line" ebuild-mode-insert-tag-line] ["Customize ebuild-mode" (customize-group 'ebuild)])) -- cgit v1.2.3-65-gdbad