[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/with-editor fcd186d1e6: docs: Suggest keymap-global-set in
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/with-editor fcd186d1e6: docs: Suggest keymap-global-set instead of define-key |
Date: |
Sun, 17 Sep 2023 07:00:38 -0400 (EDT) |
branch: elpa/with-editor
commit fcd186d1e684c2dca6497c89af77b27b2b036c11
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
docs: Suggest keymap-global-set instead of define-key
---
docs/with-editor.org | 8 ++++----
docs/with-editor.texi | 8 ++++----
lisp/with-editor.el | 8 ++++----
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/docs/with-editor.org b/docs/with-editor.org
index 963435e677..77cf40005c 100644
--- a/docs/with-editor.org
+++ b/docs/with-editor.org
@@ -161,10 +161,10 @@ prompt for an alternative environment variable such as
~$GIT_EDITOR~.
To always use these variants add this to you init file:
#+begin_src emacs-lisp
- (define-key (current-global-map)
- [remap async-shell-command] 'with-editor-async-shell-command)
- (define-key (current-global-map)
- [remap shell-command] 'with-editor-shell-command)
+ (keymap-global-set "<remap> <async-shell-command>"
+ #'with-editor-async-shell-command)
+ (keymap-global-set "<remap> <shell-command>"
+ #'with-editor-shell-command)
#+end_src
Alternatively use the global ~shell-command-with-editor-mode~.
diff --git a/docs/with-editor.texi b/docs/with-editor.texi
index 447c3972e7..831b2aafc3 100644
--- a/docs/with-editor.texi
+++ b/docs/with-editor.texi
@@ -221,10 +221,10 @@ instance is exported as @code{$EDITOR}.
To always use these variants add this to you init file:
@lisp
-(define-key (current-global-map)
- [remap async-shell-command] 'with-editor-async-shell-command)
-(define-key (current-global-map)
- [remap shell-command] 'with-editor-shell-command)
+(keymap-global-set "<remap> <async-shell-command>"
+ #'with-editor-async-shell-command)
+(keymap-global-set "<remap> <shell-command>"
+ #'with-editor-shell-command)
@end lisp
Alternatively use the global @code{shell-command-with-editor-mode}.
diff --git a/lisp/with-editor.el b/lisp/with-editor.el
index ab448d0f46..19910bb016 100644
--- a/lisp/with-editor.el
+++ b/lisp/with-editor.el
@@ -41,10 +41,10 @@
;; `$GIT_EDITOR'. To always use these variants add this to your init
;; file:
;;
-;; (define-key (current-global-map)
-;; [remap async-shell-command] #'with-editor-async-shell-command)
-;; (define-key (current-global-map)
-;; [remap shell-command] #'with-editor-shell-command)
+;; (keymap-global-set "<remap> <async-shell-command>"
+;; #'with-editor-async-shell-command)
+;; (keymap-global-set "<remap> <shell-command>"
+;; #'with-editor-shell-command)
;; Alternatively use the global `shell-command-with-editor-mode',
;; which always sets `$EDITOR' for all Emacs commands which ultimately
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/with-editor fcd186d1e6: docs: Suggest keymap-global-set instead of define-key,
ELPA Syncer <=