Commit 41ed99a3 authored by Paul Eggert's avatar Paul Eggert
Browse files

Treat “instead” strings as docstrings

* lisp/emacs-lisp/bytecomp.el (byte-compile-form):
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
Substitute quotes in instead strings.
parent 8d76c007
...@@ -2989,7 +2989,9 @@ for symbols generated by the byte compiler itself." ...@@ -2989,7 +2989,9 @@ for symbols generated by the byte compiler itself."
(byte-compile-warn "‘%s’ is for interactive use only%s" (byte-compile-warn "‘%s’ is for interactive use only%s"
fn fn
(cond ((stringp interactive-only) (cond ((stringp interactive-only)
(format "; %s" interactive-only)) (format "; %s"
(substitute-command-keys
interactive-only)))
((and (symbolp 'interactive-only) ((and (symbolp 'interactive-only)
(not (eq interactive-only t))) (not (eq interactive-only t)))
(format-message "; use ‘%s’ instead." (format-message "; use ‘%s’ instead."
......
...@@ -149,7 +149,7 @@ and also to avoid outputting the warning during normal execution." ...@@ -149,7 +149,7 @@ and also to avoid outputting the warning during normal execution."
(format-message (format-message
"‘%s’ is an obsolete %s%s%s" fun type "‘%s’ is an obsolete %s%s%s" fun type
(if asof (concat " (as of " asof ")") "") (if asof (concat " (as of " asof ")") "")
(cond ((stringp instead) (concat "; " instead)) (cond ((stringp instead) (concat "; " (substitute-command-keys instead)))
(instead (format-message "; use ‘%s’ instead." instead)) (instead (format-message "; use ‘%s’ instead." instead))
(t "."))))) (t ".")))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment