all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gregory Heytings <gregory@heytings.org>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org, Juri Linkov <juri@linkov.net>
Subject: Re: Undo mode
Date: Fri, 21 Jan 2022 09:57:18 +0000	[thread overview]
Message-ID: <6d8355dee13363ee16cd@heytings.org> (raw)
In-Reply-To: <87h79xxw7t.fsf@yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 261 bytes --]


>> I respectfully suggest to go back to that original design.
>
> We haven't yet decided to change the design
>

Going back to the original design is not changing the design, it's 
restoring the menu item as it was originally meant to be.  See attached 
patch.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Fix-Undelete-Frame-menu-item.patch --]
[-- Type: text/x-diff; name=Fix-Undelete-Frame-menu-item.patch, Size: 1732 bytes --]

From 9b025659fdbca5a0fe9ae38a05dbc13ec05a1c8a Mon Sep 17 00:00:00 2001
From: Gregory Heytings <gregory@heytings.org>
Date: Fri, 21 Jan 2022 09:47:02 +0000
Subject: [PATCH] Fix Undelete Frame menu item

* lisp/menu-bar.el (menu-bar-file-menu): Re-add the "Enable Frame Undeletion"
menu item, and restore the "Undelete Frame" menu item.
---
 lisp/menu-bar.el | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index d1ca16dbf6..3a630912a9 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -108,16 +108,15 @@ menu-bar-file-menu
     (bindings--define-key menu [separator-tab]
       menu-bar-separator)
 
-    (bindings--define-key menu [undelete-frame-mode]
-      '(menu-item "Allow Undeleting Frames" undelete-frame-mode
-                  :help "Allow frames to be restored after deletion"
-                  :button (:toggle . undelete-frame-mode)))
-
     (bindings--define-key menu [undelete-last-deleted-frame]
       '(menu-item "Undelete Frame" undelete-frame
-                  :visible (and undelete-frame-mode
-                                (car undelete-frame--deleted-frames))
+                  :visible undelete-frame-mode
+                  :enable undelete-frame--deleted-frames
                   :help "Undelete the most recently deleted frame"))
+    (bindings--define-key menu [enable-undelete-frame-mode]
+      '(menu-item "Enable Frame Undeletion" undelete-frame-mode
+                  :visible (null undelete-frame-mode)
+                  :help "Enable frame undeletion for this session"))
 
     ;; Don't use delete-frame as event name because that is a special
     ;; event.
-- 
2.34.1


  reply	other threads:[~2022-01-21  9:57 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-20 20:45 Undo mode Juri Linkov
2022-01-21  0:42 ` Stefan Monnier
2022-01-21  8:16   ` Juri Linkov
2022-01-21 11:44     ` Eli Zaretskii
2022-01-21 13:50     ` Stefan Monnier
2022-01-21 15:07       ` Gregory Heytings
2022-01-21  1:57 ` Po Lu
2022-01-21  3:11   ` [External] : " Drew Adams
2022-01-21  3:40     ` Po Lu
2022-01-21  5:35       ` Drew Adams
2022-01-21  7:56       ` Tracking master (was: [External] : Re: Undo mode) Kévin Le Gouguec
2022-01-21 12:50     ` [External] : Re: Undo mode Stefan Monnier
2022-01-21 16:45       ` Drew Adams
2022-01-21  8:18   ` Juri Linkov
2022-01-21  8:56   ` Lars Ingebrigtsen
2022-01-21  9:15     ` Po Lu
2022-01-21  9:17       ` Lars Ingebrigtsen
2022-01-21 12:52         ` Stefan Monnier
2022-01-21 11:41     ` Eli Zaretskii
2022-01-21  7:17 ` Eli Zaretskii
2022-01-21 10:09   ` Stefan Kangas
2022-01-21 10:19     ` Gregory Heytings
2022-01-21 16:45       ` [External] : " Drew Adams
2022-01-21 11:56     ` Eli Zaretskii
2022-01-22  9:51       ` Stefan Kangas
2022-01-22 10:36         ` Eli Zaretskii
2022-01-22 12:01           ` Stefan Kangas
2022-01-21  8:41 ` Gregory Heytings
2022-01-21  9:40   ` Po Lu
2022-01-21  9:57     ` Gregory Heytings [this message]
2022-01-21 10:19       ` Po Lu
2022-01-21 10:26         ` Gregory Heytings
2022-01-21 10:34           ` Po Lu
2022-01-21 10:45             ` Gregory Heytings
2022-01-21 10:51               ` Po Lu
2022-01-21 12:10           ` Eli Zaretskii
2022-01-21 11:58       ` Eli Zaretskii
2022-01-21 13:50         ` Gregory Heytings
2022-01-21 14:32           ` Eli Zaretskii
2022-01-21 14:48             ` Gregory Heytings
2022-01-21 19:41               ` Eli Zaretskii
2022-01-21 20:58                 ` Gregory Heytings
2022-01-22  0:47                   ` Po Lu
2022-01-22  7:11                   ` Eli Zaretskii
2022-01-22  8:32                     ` Gregory Heytings
2022-01-22  8:52                       ` Eli Zaretskii
2022-01-22  9:08                         ` Gregory Heytings
2022-01-22  9:47                           ` Po Lu
2022-01-22  9:51                           ` Stefan Kangas
2022-01-22  9:58                             ` Po Lu
2022-01-22 10:32                           ` Eli Zaretskii
2022-01-22 11:15                             ` Gregory Heytings
2022-01-22 11:18                               ` Eli Zaretskii
2022-01-22 13:37                                 ` Gregory Heytings
2022-01-21 11:48   ` Eli Zaretskii
2022-01-21 13:18   ` Yuri Khan
2022-01-21 14:29     ` Eli Zaretskii
2022-01-21 15:07       ` Yuri Khan
2022-01-21 19:22         ` Eli Zaretskii
2022-01-21 16:46       ` [External] : " Drew Adams
2022-01-22 18:04   ` Juri Linkov
2022-01-21  8:55 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6d8355dee13363ee16cd@heytings.org \
    --to=gregory@heytings.org \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.