diff options
Diffstat (limited to 'lisp/emacs-lisp/derived.el')
| -rw-r--r-- | lisp/emacs-lisp/derived.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 96c223c9e18..ee137f1771e 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -1,11 +1,11 @@ ;;; derived.el --- allow inheritance of major modes ;; (formerly mode-clone.el) -;; Copyright (C) 1993-1994, 1999, 2001-2013 Free Software Foundation, +;; Copyright (C) 1993-1994, 1999, 2001-2015 Free Software Foundation, ;; Inc. ;; Author: David Megginson (dmeggins@aix1.uottawa.ca) -;; Maintainer: FSF +;; Maintainer: emacs-devel@gnu.org ;; Keywords: extensions ;; Package: emacs @@ -162,7 +162,8 @@ The new mode runs the hook constructed by the function See Info node `(elisp)Derived Modes' for more details." (declare (debug (&define name symbolp sexp [&optional stringp] [&rest keywordp sexp] def-body)) - (doc-string 4)) + (doc-string 4) + (indent 3)) (when (and docstring (not (stringp docstring))) ;; Some trickiness, since what appears to be the docstring may really be @@ -330,8 +331,11 @@ 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 + (symbol-name parent))) + docstring) + nil (format "`%s' " parent)) "might have run,\nthis mode ")) (format "runs the hook `%s'" hook) |
