diff options
| author | F. Jason Park | 2024-06-10 21:56:02 -0700 |
|---|---|---|
| committer | F. Jason Park | 2024-06-12 12:26:01 -0700 |
| commit | bbac7b9fa398254e64e5ee3e8aca2f59adcfda50 (patch) | |
| tree | add7e13ac18fdb69f81907d9f4f35e3076af9da1 | |
| parent | e00af96c0691b749932756e47f48a53f5e92a00f (diff) | |
| download | emacs-bbac7b9fa398254e64e5ee3e8aca2f59adcfda50.tar.gz emacs-bbac7b9fa398254e64e5ee3e8aca2f59adcfda50.zip | |
; Amend some doc strings in ERC
* lisp/erc/erc-backend.el (define-erc-response-handler): Mention
important distinction between aliases for handlers and hooks, and note
expected type for the latter.
* lisp/erc/erc.el (erc--define-channel-user-status-compat-getter):
Mention that these accessors are not inlined like those generated by
`cl-defstruct'.
| -rw-r--r-- | lisp/erc/erc-backend.el | 4 | ||||
| -rw-r--r-- | lisp/erc/erc.el | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index e2b7c0b6f48..a4a78c66b02 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el | |||
| @@ -1649,6 +1649,10 @@ Would expand to: | |||
| 1649 | 1649 | ||
| 1650 | See also `erc-server-311'.\")) | 1650 | See also `erc-server-311'.\")) |
| 1651 | 1651 | ||
| 1652 | Note that while all ALIASES share the same handler function, each gets | ||
| 1653 | its own distinct hook variable. The default value of these variables | ||
| 1654 | may be a list or a function. Robust code should handle both. | ||
| 1655 | |||
| 1652 | \(fn (NAME &rest ALIASES) &optional EXTRA-FN-DOC EXTRA-VAR-DOC &rest FN-BODY)" | 1656 | \(fn (NAME &rest ALIASES) &optional EXTRA-FN-DOC EXTRA-VAR-DOC &rest FN-BODY)" |
| 1653 | (declare (debug (&define [&name "erc-response-handler@" | 1657 | (declare (debug (&define [&name "erc-response-handler@" |
| 1654 | ;; No `def-edebug-elem-spec' in 27. | 1658 | ;; No `def-edebug-elem-spec' in 27. |
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 025bfbc0a5f..b728dd59fa3 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -676,10 +676,11 @@ Also remove members from the server table if this was their only buffer." | |||
| 676 | (erc-remove-channel-users))) | 676 | (erc-remove-channel-users))) |
| 677 | 677 | ||
| 678 | (defmacro erc--define-channel-user-status-compat-getter (name c d) | 678 | (defmacro erc--define-channel-user-status-compat-getter (name c d) |
| 679 | "Define a gv getter for historical `erc-channel-user' status slot NAME. | 679 | "Define accessor with gv getter for historical `erc-channel-user' slot NAME. |
| 680 | Expect NAME to be a string, C to be its traditionally associated | 680 | Expect NAME to be a string, C to be its traditionally associated letter, |
| 681 | letter, and D to be its fallback power-of-2 integer for non-ERC | 681 | and D to be its fallback power-of-2 integer for non-ERC buffers. Unlike |
| 682 | buffers." | 682 | pre-ERC-5.6 accessors, do not bother generating a compiler macro for |
| 683 | inlining calls to these adapters." | ||
| 683 | `(defun ,(intern (concat "erc-channel-user-" name)) (u) | 684 | `(defun ,(intern (concat "erc-channel-user-" name)) (u) |
| 684 | ,(format "Get equivalent of pre-5.6 `%s' slot for `erc-channel-user'." | 685 | ,(format "Get equivalent of pre-5.6 `%s' slot for `erc-channel-user'." |
| 685 | name) | 686 | name) |