diff options
| author | Paul Eggert | 2015-06-15 12:40:32 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-06-15 12:41:01 -0700 |
| commit | e58a815339fe77f184da8e71e3b932a46b2c0433 (patch) | |
| tree | 193e87b6a544aa0618c4c3cca70d4cdd6d6fcbae | |
| parent | f0f216eaa1ebc84457812f66a5e714721245ef9d (diff) | |
| download | emacs-e58a815339fe77f184da8e71e3b932a46b2c0433.tar.gz emacs-e58a815339fe77f184da8e71e3b932a46b2c0433.zip | |
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
| -rw-r--r-- | lisp/emacs-lisp/derived.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 75bd325d9db..52ff2aa99a2 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el | |||
| @@ -331,9 +331,10 @@ which more-or-less shadow%s %s's corresponding table%s." | |||
| 331 | "\n\nThis mode " | 331 | "\n\nThis mode " |
| 332 | (concat | 332 | (concat |
| 333 | "\n\nIn addition to any hooks its parent mode " | 333 | "\n\nIn addition to any hooks its parent mode " |
| 334 | (if (string-match (regexp-quote (format "[`‘]%s['’]" | 334 | (if (string-match (format "[`‘]%s['’]" |
| 335 | parent)) | 335 | (regexp-quote parent)) |
| 336 | docstring) nil | 336 | docstring) |
| 337 | nil | ||
| 337 | (format "`%s' " parent)) | 338 | (format "`%s' " parent)) |
| 338 | "might have run,\nthis mode ")) | 339 | "might have run,\nthis mode ")) |
| 339 | (format "runs the hook `%s'" hook) | 340 | (format "runs the hook `%s'" hook) |