[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/simple-16-theme 4b8edaf 2/2: Add bindings and icon for undo-redo
From: |
Jimmy Aguilar Mena |
Subject: |
feature/simple-16-theme 4b8edaf 2/2: Add bindings and icon for undo-redo |
Date: |
Tue, 15 Sep 2020 10:56:27 -0400 (EDT) |
branch: feature/simple-16-theme
commit 4b8edaf3046d6ddfa50a7965dfab7ed6baaacf90
Author: Jimmy Aguilar Mena <spacibba@aol.com>
Commit: Jimmy Aguilar Mena <spacibba@aol.com>
Add bindings and icon for undo-redo
* lisp/bindings.el : Bind undo-redo to "M-_" For terminal compatibility
we can't bind C-? by default.
* lisp/tool-bar.el : Add redo icon in the tool-bar.
* lisp/term/x-win.el : Add redo to x-gtk-stock-map.
---
lisp/bindings.el | 2 ++
lisp/term/x-win.el | 1 +
lisp/tool-bar.el | 1 +
3 files changed, 4 insertions(+)
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 20342bc..b25ef3b 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -922,6 +922,8 @@ if `inhibit-field-text-motion' is non-nil."
;; Many people are used to typing C-/ on X terminals and getting C-_.
(define-key global-map [?\C-/] 'undo)
(define-key global-map "\C-_" 'undo)
+(define-key global-map "\M-_" 'undo-redo)
+
;; Richard said that we should not use C-x <uppercase letter> and I have
;; no idea whereas to bind it. Any suggestion welcome. -stef
;; (define-key ctl-x-map "U" 'undo-only)
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 42a6f40..fa87739 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -1396,6 +1396,7 @@ This returns an error if any Emacs frames are X frames."
("etc/images/save" . ("document-save" "gtk-save"))
("etc/images/saveas" . ("document-save-as" "gtk-save-as"))
("etc/images/undo" . ("edit-undo" "gtk-undo"))
+ ("etc/images/redo" . ("edit-redo" "gtk-redo"))
("etc/images/cut" . ("edit-cut" "gtk-cut"))
("etc/images/copy" . ("edit-copy" "gtk-copy"))
("etc/images/paste" . ("edit-paste" "gtk-paste"))
diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el
index 7df1e28..ac8134d 100644
--- a/lisp/tool-bar.el
+++ b/lisp/tool-bar.el
@@ -259,6 +259,7 @@ holds a keymap."
:label "Save")
(define-key-after (default-value 'tool-bar-map) [separator-1]
menu-bar-separator)
(tool-bar-add-item-from-menu 'undo "undo" nil)
+ (tool-bar-add-item-from-menu 'undo-redo "redo" nil)
(define-key-after (default-value 'tool-bar-map) [separator-2]
menu-bar-separator)
(tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [cut])
"cut" nil :vert-only t)