emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master ab78cbfabc8 3/8: Mention if an ERC module is local in its doc str


From: F. Jason Park
Subject: master ab78cbfabc8 3/8: Mention if an ERC module is local in its doc string
Date: Mon, 27 May 2024 19:52:39 -0400 (EDT)

branch: master
commit ab78cbfabc856b0f9c069ab42ad8827cdaa499ce
Author: F. Jason Park <jp@neverwas.me>
Commit: F. Jason Park <jp@neverwas.me>

    Mention if an ERC module is local in its doc string
    
    * lisp/erc/erc-common.el (erc--assemble-toggle)
    (define-erc-module): Update language of doc string to indicate if a
    module is local.
    * test/lisp/erc/erc-tests.el (define-erc-module--global)
    (define-erc-module--local)
    (define-erc-module--local/permanent-locals): Update expected output.
---
 lisp/erc/erc-common.el     |  8 ++++----
 test/lisp/erc/erc-tests.el | 18 +++++++++---------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/lisp/erc/erc-common.el b/lisp/erc/erc-common.el
index 4115e314b39..51a93bdaa50 100644
--- a/lisp/erc/erc-common.el
+++ b/lisp/erc/erc-common.el
@@ -216,7 +216,7 @@ instead of a `set' state, which precludes any actual 
saving."
     `(defun ,ablsym ,(if localp `(&optional ,arg) '())
        ,(erc--fill-module-docstring
          (if val "Enable" "Disable")
-         " ERC " (symbol-name name) " mode."
+         " ERC " (symbol-name name) " mode" (and localp " locally") "."
          (when localp
            (concat "\nWhen called interactively,"
                    " do so in all buffers for the current connection.")))
@@ -413,11 +413,11 @@ Example:
     `(progn
        (define-minor-mode
          ,mode
-         ,(erc--fill-module-docstring (format "Toggle ERC %s mode.
-With a prefix argument ARG, enable %s if ARG is positive,
+         ,(erc--fill-module-docstring (format "Toggle ERC %s mode%s.
+If called interactively, enable `%s' if ARG is positive,
 and disable it otherwise.  If called from Lisp, enable the mode
 if ARG is omitted or nil.
-\n%s" name name doc))
+\n%s" name (if local-p " locally" "") mode doc))
          :global ,(not local-p)
          :group (erc--find-group ',name ,(and alias (list 'quote alias)))
          ,@(unless local-p `(:require ',(erc--find-feature name alias)))
diff --git a/test/lisp/erc/erc-tests.el b/test/lisp/erc/erc-tests.el
index 6a46246725e..f393402fe81 100644
--- a/test/lisp/erc/erc-tests.el
+++ b/test/lisp/erc/erc-tests.el
@@ -3667,9 +3667,9 @@
 
                       (define-minor-mode erc-mname-mode
                         "Toggle ERC mname mode.
-With a prefix argument ARG, enable mname if ARG is positive, and
-disable it otherwise.  If called from Lisp, enable the mode if
-ARG is omitted or nil.
+If called interactively, enable `erc-mname-mode' if ARG is
+positive, and disable it otherwise.  If called from Lisp, enable
+the mode if ARG is omitted or nil.
 
 Some docstring."
                         :global t
@@ -3724,10 +3724,10 @@ Some docstring."
     (should (equal got
                    `(progn
                       (define-minor-mode erc-mname-mode
-                        "Toggle ERC mname mode.
-With a prefix argument ARG, enable mname if ARG is positive, and
-disable it otherwise.  If called from Lisp, enable the mode if
-ARG is omitted or nil.
+                        "Toggle ERC mname mode locally.
+If called interactively, enable `erc-mname-mode' if ARG is
+positive, and disable it otherwise.  If called from Lisp, enable
+the mode if ARG is omitted or nil.
 
 Some docstring."
                         :global nil
@@ -3738,7 +3738,7 @@ Some docstring."
                             (erc-mname-disable))))
 
                       (defun erc-mname-enable (&optional ,arg-en)
-                        "Enable ERC mname mode.
+                        "Enable ERC mname mode locally.
 When called interactively, do so in all buffers for the current
 connection."
                         (interactive "p")
@@ -3751,7 +3751,7 @@ connection."
                             (ignore a) (ignore b))))
 
                       (defun erc-mname-disable (&optional ,arg-dis)
-                        "Disable ERC mname mode.
+                        "Disable ERC mname mode locally.
 When called interactively, do so in all buffers for the current
 connection."
                         (interactive "p")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]