Bleeding edge Emacs is starting to complain about certain uses of '
in doc strings. I am trying to resolve these.
As a typical example, in a doc string I might include an example:
(defun my-mode-indent-function (&optional _whole-exp)
"Indent.
To extend, use your Emacs init file to
(put SYMBOL 'my-mode-indent-function INDENT)
Where SYMBOL is blah blah blah and INDENT is blah blah blah."
___)
Although this has worked fine "forever", starting recently on master for Emacs 29.0.50, byte compiling complains:
foo.el:123:2: Error: defun `my-mode-indent-function' docstring has wrong usage of unescaped single quotes (use \= or different quoting)
That is, it doesn't like the '
in 'my-mode-indent-function
.
I am trying to follow the hint in the error message -- (use \= or different quoting)
-- but with no joy.
The following avoids the error but the doc string shows ='my-mode-indent
:
(put SYMBOL \='my-mode-indent-function INDENT)
The following still produces the error:
(put SYMBOL \'my-mode-indent-function INDENT)
Of course I could use the full quote
form everywhere -- but that would be the doc formatting tail wagging the desired real-world example dog:
(put SYMBOL (quote my-mode-indent-function) INDENT)
What is \=
and where can I learn more about it? It seems to be one of those things that's tricky to search for; I can't find more information anywhere.