unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#43315: 28.0.50; Improvements to menu-bar Edit: add redo
@ 2020-09-10 18:29 Caio Henrique
  2020-09-10 20:59 ` Lars Ingebrigtsen
  2020-09-11  4:18 ` Richard Stallman
  0 siblings, 2 replies; 6+ messages in thread
From: Caio Henrique @ 2020-09-10 18:29 UTC (permalink / raw)
  To: 43315

Hi,

After the recent discussions to improve discoverability of Emacs, I
analyzed the Emacs menu-bar and the menu bar of  other text
editors. They all have a "Redo" option close to the "Undo".

Here are some examples:

1. nano
When you launch nano on the terminal, you can see the text on the bottom
that says "M-E Redo", right bellow "Undo".

2. libreoffice write
When you open the Edit menu, you will find that the first option is "Undo"
and the second is "Redo".

3. Notepad++
Same as libreoffice write.

4. Visual Studio Code
Same as libreoffice write.

Here is my proposal:
I'm not used to the default undo system since I use undo-tree, but it
seems that Emacs 28 has added a function called undo-redo to the
simple.el file, right? My proposal is to add it to the menu-bar, right
bellow "Undo":

_____
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index bc094c9050..30d86c7f17 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -536,6 +536,12 @@ menu-bar-edit-menu
     (if (featurep 'ns)
         (bindings--define-key menu [separator-undo] menu-bar-separator))
 
+    (bindings--define-key menu [undo-redo]
+      '(menu-item "Redo" undo-redo
+                  :enable (and (not buffer-read-only)
+                           (undo--last-change-was-undo-p buffer-undo-list))
+                  :help "Undo last undo"))
+
     (bindings--define-key menu [undo]
       '(menu-item "Undo" undo
                   :enable (and (not buffer-read-only)
____

Cordially,
Caio Henrique






^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-11  6:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10 18:29 bug#43315: 28.0.50; Improvements to menu-bar Edit: add redo Caio Henrique
2020-09-10 20:59 ` Lars Ingebrigtsen
2020-09-10 22:21   ` Caio Henrique
2020-09-11  6:36     ` Eli Zaretskii
2020-09-11  5:59   ` Eli Zaretskii
2020-09-11  4:18 ` Richard Stallman

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).