Function: erc-button--display-error-notice-with-keys
erc-button--display-error-notice-with-keys is an autoloaded and
byte-compiled function defined in erc-button.el.gz.
Signature
(erc-button--display-error-notice-with-keys MAYBE-BUFFER &rest STRINGS)
Documentation
Add help keys to STRINGS for configuration-related admonishments.
Return inserted result. Expect MAYBE-BUFFER to be an ERC buffer,
a string, or nil. When it's a buffer, specify the buffer
argument when calling erc-display-message. Otherwise, add it
to STRINGS. If STRINGS contains any trailing non-nil
non-strings, concatenate leading string members before applying
format. Otherwise, just concatenate everything.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-button.el.gz
;;;###autoload
(defun erc-button--display-error-notice-with-keys (maybe-buffer &rest strings)
"Add help keys to STRINGS for configuration-related admonishments.
Return inserted result. Expect MAYBE-BUFFER to be an ERC buffer,
a string, or nil. When it's a buffer, specify the `buffer'
argument when calling `erc-display-message'. Otherwise, add it
to STRINGS. If STRINGS contains any trailing non-nil
non-strings, concatenate leading string members before applying
`format'. Otherwise, just concatenate everything."
(let* ((buffer (if (bufferp maybe-buffer)
maybe-buffer
(when (stringp maybe-buffer)
(push maybe-buffer strings))
'active))
(op (if (seq-every-p (lambda (o) (or (not o) (stringp o)))
(cdr strings))
#'concat
(let ((head (pop strings)))
(while (or (stringp (car strings))
(and strings (not (car strings))))
(setq head (concat head (pop strings))))
(push head strings))
#'format))
(string (apply op strings))
;; Avoid timestamps unless left-sided.
(skipp (or (bound-and-true-p erc-stamp--display-margin-mode)
(not (fboundp 'erc-timestamp-offset))
(zerop (erc-timestamp-offset))))
(erc--msg-prop-overrides `(,@(and skipp `((erc--skip stamp)))
,@erc--msg-prop-overrides))
(erc-insert-post-hook
(cons (lambda ()
(setq string (buffer-substring (point-min)
(1- (point-max)))))
erc-insert-post-hook))
(erc-button-alist
`((,(rx "\\[" (group (+ (not "]"))) "]") 0
erc-button--display-error-with-buttons
erc-button-describe-symbol 1)
,@erc-button-alist)))
(erc-display-message nil '(t notice error) buffer string)
string))