GNU bug report logs -
#75876
29.2; warning "docstring has wrong usage of unescaped single quotes" in easy-mmode.el
Previous Next
Reported by: "R. Diez" <rdiezmail-emacs <at> yahoo.de>
Date: Sun, 26 Jan 2025 17:59:02 UTC
Severity: normal
Tags: notabug
Found in version 29.2
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Date: Sun, 26 Jan 2025 18:58:12 +0100
> From: "R. Diez" via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
>
> I am getting the following warning in 'dtrt-indent-global-mode':
>
> dtrt-indent.el:208:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
>
> The author of package dtrt-indent.el says the warning is incorrect:
>
> https://github.com/jscheid/dtrt-indent/issues/79#issuecomment-2614031451
>
> I do now know much Lisp myself, but I suspect the warning probably actually comes from macro 'define-globalized-minor-mode' in easy-mmode.el, because that macro apparently does have a docstring without proper quoting.
>
> I am reporting this bug here because easy-mmode.el says it is part of Emacs.
This is because the mode function is defined as lambda:
(define-globalized-minor-mode dtrt-indent-global-mode dtrt-indent-mode
(lambda ()
;; javascript-mode is an alias for js-mode, so derived-mode-p does not
;; detect it is derived from 'prog-mode (Emacs bug #46331: remove once
;; Emacs >= 28.1 can be assumed)
(when (derived-mode-p 'prog-mode 'text-mode 'javascript-mode)
(dtrt-indent-mode)))
If you load the file and invoke describe-function, it says:
(dtrt-indent-global-mode &optional ARG)
Toggle Dtrt-Indent mode in all buffers.
With prefix ARG, enable Dtrt-Indent-Global mode if ARG is positive;
otherwise, disable it.
If called from Lisp, toggle the mode if ARG is ‘toggle’.
Enable the mode if ARG is nil, omitted, or is a positive number.
Disable the mode if ARG is a negative number.
Dtrt-Indent mode is enabled in all buffers where ‘(lambda nil (when
(derived-mode-p ’prog-mode ’text-mode ’javascript-mode)
(dtrt-indent-mode)))’ would do it.
And there you see that nonsense with the lambda and the unescaped
quotes.
Stefan, any comments?
This bug report was last modified 105 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.