aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorF. Jason Park2023-01-16 20:18:32 -0800
committerF. Jason Park2023-04-08 14:23:51 -0700
commit39d4f32fc9b87598ed6070d300d5b5e17e7ea84f (patch)
treea3a7407727a7ca2dcf91763546cbc12ff42360c0 /test
parent9c65ac73655c71a7f289d8c86ee6d7a314c32a05 (diff)
downloademacs-39d4f32fc9b87598ed6070d300d5b5e17e7ea84f.tar.gz
emacs-39d4f32fc9b87598ed6070d300d5b5e17e7ea84f.zip
Fill doc strings for ERC modules
* lisp/erc/erc-common.el (erc--fill-module-docstring): Add helper to fill doc strings. (erc--assemble-toggle, define-erc-module): Use helper to fill doc string. * test/lisp/erc/erc-tests.el (define-minor-mode--global, define-minor-mode--local): Adjust expected output for generated doc strings. (Bug#60935.)
Diffstat (limited to 'test')
-rw-r--r--test/lisp/erc/erc-tests.el28
1 files changed, 16 insertions, 12 deletions
diff --git a/test/lisp/erc/erc-tests.el b/test/lisp/erc/erc-tests.el
index b1df04841a4..ae19b7d0aad 100644
--- a/test/lisp/erc/erc-tests.el
+++ b/test/lisp/erc/erc-tests.el
@@ -1472,7 +1472,7 @@
1472 1472
1473(ert-deftest define-erc-module--global () 1473(ert-deftest define-erc-module--global ()
1474 (let ((global-module '(define-erc-module mname malias 1474 (let ((global-module '(define-erc-module mname malias
1475 "Some docstring" 1475 "Some docstring."
1476 ((ignore a) (ignore b)) 1476 ((ignore a) (ignore b))
1477 ((ignore c) (ignore d))))) 1477 ((ignore c) (ignore d)))))
1478 1478
@@ -1484,10 +1484,11 @@
1484 1484
1485 (define-minor-mode erc-mname-mode 1485 (define-minor-mode erc-mname-mode
1486 "Toggle ERC mname mode. 1486 "Toggle ERC mname mode.
1487With a prefix argument ARG, enable mname if ARG is positive, 1487With a prefix argument ARG, enable mname if ARG is positive, and
1488and disable it otherwise. If called from Lisp, enable the mode 1488disable it otherwise. If called from Lisp, enable the mode if
1489if ARG is omitted or nil. 1489ARG is omitted or nil.
1490Some docstring" 1490
1491Some docstring."
1491 :global t 1492 :global t
1492 :group (erc--find-group 'mname 'malias) 1493 :group (erc--find-group 'mname 'malias)
1493 :get #'erc--neuter-custom-variable-state 1494 :get #'erc--neuter-custom-variable-state
@@ -1528,7 +1529,7 @@ Some docstring"
1528 1529
1529(ert-deftest define-erc-module--local () 1530(ert-deftest define-erc-module--local ()
1530 (let* ((global-module '(define-erc-module mname nil ; no alias 1531 (let* ((global-module '(define-erc-module mname nil ; no alias
1531 "Some docstring" 1532 "Some docstring."
1532 ((ignore a) (ignore b)) 1533 ((ignore a) (ignore b))
1533 ((ignore c) (ignore d)) 1534 ((ignore c) (ignore d))
1534 'local)) 1535 'local))
@@ -1540,10 +1541,11 @@ Some docstring"
1540 `(progn 1541 `(progn
1541 (define-minor-mode erc-mname-mode 1542 (define-minor-mode erc-mname-mode
1542 "Toggle ERC mname mode. 1543 "Toggle ERC mname mode.
1543With a prefix argument ARG, enable mname if ARG is positive, 1544With a prefix argument ARG, enable mname if ARG is positive, and
1544and disable it otherwise. If called from Lisp, enable the mode 1545disable it otherwise. If called from Lisp, enable the mode if
1545if ARG is omitted or nil. 1546ARG is omitted or nil.
1546Some docstring" 1547
1548Some docstring."
1547 :global nil 1549 :global nil
1548 :group (erc--find-group 'mname nil) 1550 :group (erc--find-group 'mname nil)
1549 (if erc-mname-mode 1551 (if erc-mname-mode
@@ -1552,7 +1554,8 @@ Some docstring"
1552 1554
1553 (defun erc-mname-enable (&optional ,arg-en) 1555 (defun erc-mname-enable (&optional ,arg-en)
1554 "Enable ERC mname mode. 1556 "Enable ERC mname mode.
1555When called interactively, do so in all buffers for the current connection." 1557When called interactively, do so in all buffers for the current
1558connection."
1556 (interactive "p") 1559 (interactive "p")
1557 (when (derived-mode-p 'erc-mode) 1560 (when (derived-mode-p 'erc-mode)
1558 (if ,arg-en 1561 (if ,arg-en
@@ -1564,7 +1567,8 @@ When called interactively, do so in all buffers for the current connection."
1564 1567
1565 (defun erc-mname-disable (&optional ,arg-dis) 1568 (defun erc-mname-disable (&optional ,arg-dis)
1566 "Disable ERC mname mode. 1569 "Disable ERC mname mode.
1567When called interactively, do so in all buffers for the current connection." 1570When called interactively, do so in all buffers for the current
1571connection."
1568 (interactive "p") 1572 (interactive "p")
1569 (when (derived-mode-p 'erc-mode) 1573 (when (derived-mode-p 'erc-mode)
1570 (if ,arg-dis 1574 (if ,arg-dis