diff options
| author | F. Jason Park | 2024-05-08 15:26:29 -0700 |
|---|---|---|
| committer | F. Jason Park | 2024-05-08 17:13:51 -0700 |
| commit | d647a5238705bbb4a9277d71bb8069fba2cac7f3 (patch) | |
| tree | 49258fd792bbf98f0475d1d83487cf22b44a67ad | |
| parent | caddc4e727a46e6b6ec7146c9e1cdc7b954f5c16 (diff) | |
| download | emacs-d647a5238705bbb4a9277d71bb8069fba2cac7f3.tar.gz emacs-d647a5238705bbb4a9277d71bb8069fba2cac7f3.zip | |
Avoid shared-ref read syntax in ERC message catalogs
* lisp/erc/erc.el (erc--message-speaker-ctcp-action-input)
(erc--message-speaker-ctcp-action-statusmsg-input): Don't use
shared/circular references, like #1=foo ... #1#, in literal strings
because it triggers CI validation failures. These message-format
definitions were originally introduced as part of bug#67677.
| -rw-r--r-- | lisp/erc/erc.el | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index ce805fdab13..c92fd42322a 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -6135,7 +6135,8 @@ NUH, and the current `erc-response' object.") | |||
| 6135 | 6135 | ||
| 6136 | ;; The format strings in the following `-speaker' catalog shouldn't | 6136 | ;; The format strings in the following `-speaker' catalog shouldn't |
| 6137 | ;; contain any non-protocol words, so they make sense in any language. | 6137 | ;; contain any non-protocol words, so they make sense in any language. |
| 6138 | 6138 | ;; Note that the following definitions generally avoid `propertize' | |
| 6139 | ;; because it reverses the order of the text properties it's given. | ||
| 6139 | (defvar erc--message-speaker-statusmsg | 6140 | (defvar erc--message-speaker-statusmsg |
| 6140 | #("(%p%n%s) %m" | 6141 | #("(%p%n%s) %m" |
| 6141 | 0 1 (font-lock-face erc-default-face) | 6142 | 0 1 (font-lock-face erc-default-face) |
| @@ -6227,11 +6228,11 @@ NUH, and the current `erc-response' object.") | |||
| 6227 | "Message template for a CTCP ACTION from another user.") | 6228 | "Message template for a CTCP ACTION from another user.") |
| 6228 | 6229 | ||
| 6229 | (defvar erc--message-speaker-ctcp-action-input | 6230 | (defvar erc--message-speaker-ctcp-action-input |
| 6230 | #("* %p%n %m" | 6231 | (let ((base '(erc-input-face erc-action-face))) ; shared |
| 6231 | 0 2 (font-lock-face #1=(erc-input-face erc-action-face)) | 6232 | (concat (propertize "* " 'font-lock-face base) |
| 6232 | 2 4 (font-lock-face (erc-my-nick-prefix-face . #1#)) | 6233 | (propertize "%p" 'font-lock-face `(erc-my-nick-prefix-face ,@base)) |
| 6233 | 4 6 (font-lock-face (erc-my-nick-face . #1#)) | 6234 | (propertize "%n" 'font-lock-face `(erc-my-nick-face ,@base)) |
| 6234 | 6 9 (font-lock-face #1#)) | 6235 | (propertize " %m" 'font-lock-face base))) |
| 6235 | "Message template for a CTCP ACTION from current client.") | 6236 | "Message template for a CTCP ACTION from current client.") |
| 6236 | 6237 | ||
| 6237 | (defvar erc--message-speaker-ctcp-action-statusmsg | 6238 | (defvar erc--message-speaker-ctcp-action-statusmsg |
| @@ -6244,12 +6245,12 @@ NUH, and the current `erc-response' object.") | |||
| 6244 | "Template for a CTCP ACTION status message from another chan op.") | 6245 | "Template for a CTCP ACTION status message from another chan op.") |
| 6245 | 6246 | ||
| 6246 | (defvar erc--message-speaker-ctcp-action-statusmsg-input | 6247 | (defvar erc--message-speaker-ctcp-action-statusmsg-input |
| 6247 | #("* (%p%n%s) %m" | 6248 | (let ((base '(erc-input-face erc-action-face))) ; shared |
| 6248 | 0 3 (font-lock-face #1=(erc-input-face erc-action-face)) | 6249 | (concat (propertize "* (" 'font-lock-face base) |
| 6249 | 3 5 (font-lock-face (erc-my-nick-prefix-face . #1#)) | 6250 | (propertize "%p" 'font-lock-face `(erc-my-nick-prefix-face ,@base)) |
| 6250 | 5 7 (font-lock-face (erc-my-nick-face . #1#)) | 6251 | (propertize "%n" 'font-lock-face `(erc-my-nick-face ,@base)) |
| 6251 | 7 9 (font-lock-face (erc-notice-face . #1#)) | 6252 | (propertize "%s" 'font-lock-face `(erc-notice-face ,@base)) |
| 6252 | 9 13 (font-lock-face #1#)) | 6253 | (propertize ") %m" 'font-lock-face base))) |
| 6253 | "Template for a CTCP ACTION status message from current client.") | 6254 | "Template for a CTCP ACTION status message from current client.") |
| 6254 | 6255 | ||
| 6255 | (defun erc--speakerize-nick (nick &optional disp) | 6256 | (defun erc--speakerize-nick (nick &optional disp) |