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."
(byte-compile-warn "‘%s’ is for interactive use only%s"
(cond ((stringp interactive-only)
(format "; %s" interactive-only))
(format "; %s"
((and (symbolp 'interactive-only)
(not (eq interactive-only t)))
(format-message "; use ‘%s’ instead."
......@@ -149,7 +149,7 @@ and also to avoid outputting the warning during normal execution."
"‘%s’ is an obsolete %s%s%s" fun type
(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))
(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