[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit 8a92e102b9 2/3: magit-*-thing: Improve docstrin
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit 8a92e102b9 2/3: magit-*-thing: Improve docstrings |
Date: |
Sat, 23 Sep 2023 16:00:18 -0400 (EDT) |
branch: elpa/git-commit
commit 8a92e102b918155f3626c1a6c05f8447bfc46040
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
magit-*-thing: Improve docstrings
The remapping does not necessarily happen in section-specific keymaps.
Imply that remapping should be used to bind other commands. Mention
that an error is signaled if a placeholder command is actually called.
---
lisp/magit-mode.el | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index c2ab1fea75..b0bec6eebd 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -405,34 +405,35 @@ recommended value."
"<remap> <evil-next-line>" 'evil-next-visual-line)
(defun magit-delete-thing ()
- "This is a placeholder command.
-Where applicable, section-specific keymaps bind another command
-which deletes the thing at point."
+ "This is a placeholder command, which signals an error if called.
+Where applicable, other keymaps remap this command to another,
+which actually deletes the thing at point."
(interactive)
(user-error "There is no thing at point that could be deleted"))
(defun magit-visit-thing ()
- "This is a placeholder command.
-Where applicable, section-specific keymaps bind another command
-which visits the thing at point."
+ "This is a placeholder command, which may signal an error if called.
+Where applicable, other keymaps remap this command to another,
+which actually visits the thing at point."
(interactive)
(if (eq transient-current-command 'magit-dispatch)
(call-interactively (key-binding (this-command-keys)))
(user-error "There is no thing at point that could be visited")))
(defun magit-edit-thing ()
- "This is a placeholder command.
-Where applicable, section-specific keymaps bind another command
-which lets you edit the thing at point, likely in another buffer."
+ "This is a placeholder command, which may signal an error if called.
+Where applicable, other keymaps remap this command to another,
+which actually lets you edit the thing at point, likely in another
+buffer."
(interactive)
(if (eq transient-current-command 'magit-dispatch)
(call-interactively (key-binding (this-command-keys)))
(user-error "There is no thing at point that could be edited")))
(defun magit-browse-thing ()
- "This is a placeholder command.
-Where applicable, section-specific keymaps bind another command
-which visits the thing at point using `browse-url'."
+ "This is a placeholder command, which signals an error if called.
+Where applicable, other keymaps remap this command to another,
+which actually visits thing at point using `browse-url'."
(interactive)
(user-error "There is no thing at point that could be browsed"))