[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hyperdrive 046b8f4493 06/11: Change: "Hyperdrive" menu bar
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hyperdrive 046b8f4493 06/11: Change: "Hyperdrive" menu bar now appears at the top level |
Date: |
Fri, 1 Dec 2023 18:59:54 -0500 (EST) |
branch: elpa/hyperdrive
commit 046b8f4493595ace9832ee906fab4c2ab5730c3e
Merge: 1303b8a7ab 5d8c3fe421
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>
Change: "Hyperdrive" menu bar now appears at the top level
Previously, hyperdrive-menu-bar-mode added a menu bar inside of the
"Tools" submenu.
---
CHANGELOG.org | 1 +
doc/hyperdrive.org | 10 ++++------
doc/hyperdrive.texi | 10 ++++------
hyperdrive-lib.el | 15 ++++++---------
hyperdrive.el | 18 +++++++++---------
5 files changed, 24 insertions(+), 30 deletions(-)
diff --git a/CHANGELOG.org b/CHANGELOG.org
index 7641357628..ae216618f0 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -29,6 +29,7 @@ This project adheres to
[[https://semver.org/spec/v2.0.0.html][Semantic Versioni
selecting a hyperdrive into ~hyperdrive-menu-hyperdrive~.
- Refactored the ~*hyperdrive-mirror*~ buffer to use
[[https://github.com/alphapapa/taxy.el/tree/package/taxy-magit-section][taxy-magit-section]]
- Removed ~rx~ form option in ~hyperdrive-mirror~
+- The "Hyperdrive" menu bar now shows up at the top-level.
- Require at least Emacs 28.1+
** Fixed
diff --git a/doc/hyperdrive.org b/doc/hyperdrive.org
index 6737d9cee4..7e3a6a6c37 100644
--- a/doc/hyperdrive.org
+++ b/doc/hyperdrive.org
@@ -159,12 +159,10 @@ On the network it still may be there.
#+findex: menu-bar-mode
If you enabled ~hyperdrive-menu-bar-mode~, either in your configuration
-(see [[*Example configuration]]) or with ~M-x hyperdrive-menu-bar-mode~,
-the "Hyperdrive" menu should appear inside the "Tools" menu at the top
-of the screen. When the current buffer is visiting a hyperdrive
-file/directory, the "Hyperdrive" menu will also be displayed as a
-top-level menu. If you don't see the menu bar, please double check
-that ~menu-bar-mode~ is enabled (it is enabled by default).
+(see [[*Example configuration]]) or with ~M-x hyperdrive-menu-bar-mode~, the
+"Hyperdrive" menu should appear after the "Tools" menu at the top of
+the screen. If you don't see the menu bar, please double check that
+~menu-bar-mode~ is enabled (it is enabled by default).
- Command: hyperdrive-menu-bar-mode ::
diff --git a/doc/hyperdrive.texi b/doc/hyperdrive.texi
index 99546b5fdf..da0257a770 100644
--- a/doc/hyperdrive.texi
+++ b/doc/hyperdrive.texi
@@ -362,12 +362,10 @@ On the network it still may be there.
@findex menu-bar-mode
If you enabled @code{hyperdrive-menu-bar-mode}, either in your configuration
-(see @ref{Example configuration}) or with @code{M-x hyperdrive-menu-bar-mode},
-the ``Hyperdrive'' menu should appear inside the ``Tools'' menu at the top
-of the screen. When the current buffer is visiting a hyperdrive
-file/directory, the ``Hyperdrive'' menu will also be displayed as a
-top-level menu. If you don't see the menu bar, please double check
-that @code{menu-bar-mode} is enabled (it is enabled by default).
+(see @ref{Example configuration}) or with @code{M-x hyperdrive-menu-bar-mode},
the
+``Hyperdrive'' menu should appear after the ``Tools'' menu at the top of
+the screen. If you don't see the menu bar, please double check that
+@code{menu-bar-mode} is enabled (it is enabled by default).
@deffn Command hyperdrive-menu-bar-mode
Enable the ``Hyperdrive'' menu bar.
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 580bd12824..1d56760fb4 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1659,15 +1659,12 @@ When PATH is nil or blank, return \"/\"."
"Remove all local variables, overlays, and text properties in BUFFER.
When BUFFER is nil, act on current buffer."
(with-current-buffer (or buffer (current-buffer))
- (if (>= emacs-major-version 29)
- ;; FIXME: This causes a native compilation error on Emacs 28 because
the
- ;; call to `kill-all-local-variables' with the argument gets compiled
- ;; even though it wouldn't get called at runtime.
- (with-suppressed-warnings ((callargs kill-all-local-variables))
- (kill-all-local-variables t))
- ;; NOTE: On Emacs <29, this function will not kill permanent-local
- ;; variables. We're not sure if that will be a problem.
- (kill-all-local-variables))
+ ;; TODO(deprecate-28): Call `kill-all-local-variables' with argument to
also kill permanent-local variables.
+ ;; We're not sure if this is absolutely necessary, but it seems like a good
+ ;; idea. But on Emacs 28 that function does not take an argument, and
+ ;; trying to do so conditionally causes a native-compilation error, so we
+ ;; omit it for now.
+ (kill-all-local-variables)
(let ((inhibit-read-only t))
(delete-all-overlays)
(set-text-properties (point-min) (point-max) nil))))
diff --git a/hyperdrive.el b/hyperdrive.el
index 191b8e93e2..9cb8983c29 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -104,7 +104,8 @@ Customize behavior with `hyperdrive-gateway-process-type',
which see."
;;;###autoload
(defun hyperdrive-stop ()
"Stop `hyper-gateway' if running.
-Customize behavior with `hyperdrive-gateway-process-type', which see."
(interactive)
+Customize behavior with `hyperdrive-gateway-process-type', which see."
+ (interactive)
(h//gateway-stop))
;;;###autoload
@@ -803,8 +804,7 @@ The return value of this function is the retrieval buffer."
;;;;; `easy-menu' integration
(defvar h/menu-bar-menu
- '("Hyperdrive"
- ("Gateway"
+ '(("Gateway"
:label
(format "Gateway (%s)" (if (h/status) "on" "off"))
["Start Gateway" h/start
@@ -1173,16 +1173,16 @@ The return value of this function is the retrieval
buffer."
["User Manual" h/info-manual
:help "Open hyperdrive.el info manual"]))
-(easy-menu-define h/easy-menu h/mode-map
- "Menu with all Hyperdrive commands." h/menu-bar-menu)
-
;;;###autoload
(define-minor-mode hyperdrive-menu-bar-mode "Show hyperdrive in \"Tools\" menu
bar."
:global t :group 'hyperdrive
(if h/menu-bar-mode
- (easy-menu-add-item menu-bar-tools-menu nil h/menu-bar-menu
- "Read Net News")
- (easy-menu-remove-item menu-bar-tools-menu nil "Hyperdrive")))
+ ;; Inspired by
https://utcc.utoronto.ca/~cks/space/blog/programming/EmacsEasyMenuAndMenubarOrder
+ (define-key-after global-map [menu-bar hyperdrive]
+ (easy-menu-binding
+ (easy-menu-create-menu "Hyperdrive" h/menu-bar-menu) "Hyperdrive")
+ "Tools")
+ (define-key global-map [menu-bar hyperdrive] nil)))
;;;;; Miscellaneous commands
- [nongnu] elpa/hyperdrive updated (e18fc5da04 -> e295cf3eca), ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive d615e85fa3 01/11: Fix: (h//clean-buffer) Avoid native compilation error, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 046b8f4493 06/11: Change: "Hyperdrive" menu bar now appears at the top level,
ELPA Syncer <=
- [nongnu] elpa/hyperdrive acb4d38b3d 08/11: Tidy: Use transient-prefix-object, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive c8109d6438 07/11: Meta: Update changelog, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive e295cf3eca 11/11: Meta: Update changelog with PDF set-auto-mode fix, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 971fb81469 04/11: Docs: Update documentation for hyperdrive-menu-bar-mode, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 5d8c3fe421 05/11: Meta: Update changelog with hyperdrive-menu-bar-mode changes, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive feae3dcff3 10/11: Tidy: Indentation, spelling word, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive b152d72f19 02/11: Change: Put "Hyperdrive" menu bar in global-map, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 18a8f70b1a 03/11: Fix: (h/menu-bar-menu) Remove "Hyperdrive" as first item, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 32a503aa26 09/11: Change/Fix: Call set-auto-mode in handlers, ELPA Syncer, 2023/12/01