summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorNicholas Vollmer <iarchivedmywholelife@gmail.com>2023-05-07 00:06:18 -0400
committerEli Zaretskii <eliz@gnu.org>2023-05-07 16:37:24 +0300
commite920dd2b6f92e472372ee3499d7f9353f0432cf7 (patch)
treee75862f78f7600891dba63ffc79b8978ed0465ba /lisp/emacs-lisp
parent910a7b30dfd185eda78caf48e6f634a6a6e086f1 (diff)
downloademacs-e920dd2b6f92e472372ee3499d7f9353f0432cf7.tar.gz
emacs-e920dd2b6f92e472372ee3499d7f9353f0432cf7.tar.bz2
emacs-e920dd2b6f92e472372ee3499d7f9353f0432cf7.zip
define-minor-mode: sanitize mode function messages
* emacs-lisp/easy-mmode.el (define-minor-mode): Ensure mode's pretty name is not interprted as a message formatting string, e.g., if the mode name contains a '%'. (Bug#63343)
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/easy-mmode.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 0f6711209a5..22ea12f0960 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -390,7 +390,7 @@ or call the function `%s'."))))
(not (equal ,last-message
(current-message))))
(let ((local ,(if globalp "" " in current buffer")))
- (message ,(format "%s %%sabled%%s" pretty-name)
+ (message "%s %sabled%s" ,pretty-name
(if ,getter "en" "dis") local)))))
,@(when after-hook `(,after-hook)))
(force-mode-line-update)