1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-16 17:19:41 +00:00

Fix quoting when making derived mode docstring

* lisp/emacs-lisp/derived.el (derived-mode-make-docstring):
Nest regexp-quote inside format, not the reverse.
Problem reported by Artur Malabarba in:
http://lists.gnu.org/archive/html/emacs-devel/2015-06/msg00206.html
This commit is contained in:
Paul Eggert 2015-06-15 12:40:32 -07:00
parent f0f216eaa1
commit e58a815339

View File

@ -331,9 +331,10 @@ which more-or-less shadow%s %s's corresponding table%s."
"\n\nThis mode "
(concat
"\n\nIn addition to any hooks its parent mode "
(if (string-match (regexp-quote (format "[`]%s[']"
parent))
docstring) nil
(if (string-match (format "[`]%s[']"
(regexp-quote parent))
docstring)
nil
(format "`%s' " parent))
"might have run,\nthis mode "))
(format "runs the hook `%s'" hook)