From: F. Jason Park Date: Sat, 8 Oct 2022 04:55:30 +0000 (-0700) Subject: Accommodate missing spec values in erc-format-message X-Git-Tag: emacs-29.0.90~1616^2~662 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4a1a4bf0e2dfe3987b18cfd2122d43db1e8a58c1;p=emacs.git Accommodate missing spec values in erc-format-message * lisp/erc/erc.el (erc-format-message): Although not mentioned in its log message, commit 5281946fbf6b3cdbec5ce82e0057c71849faf4d2 "Make format-spec accept function substitutions" also fixed a bug involving the `ignore-missing' parameter of `format-spec'. Until now, ERC has been relying on the old behavior to gracefully handle malformed server messages. This commit tries to regain that functionality. --- diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index f128387bcf6..db39e341b2f 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -6961,6 +6961,8 @@ shortened server name instead." (defvar tabbar--local-hlf) +;; FIXME when 29.1 is cut and `format-spec' is added to ELPA Compat, +;; remove the function invocations from the spec form below. (defun erc-update-mode-line-buffer (buffer) "Update the mode line in a single ERC buffer BUFFER." (with-current-buffer buffer @@ -7325,7 +7327,7 @@ See also `format-spec'." (error "No format spec for message %s" msg)) (when (functionp entry) (setq entry (apply entry args))) - (format-spec entry (apply #'format-spec-make args)))) + (format-spec entry (apply #'format-spec-make args) 'ignore))) ;;; Various hook functions