From: Miles Bader Date: Fri, 6 Oct 2000 05:32:14 +0000 (+0000) Subject: (define-derived-mode): Tweak generated docstring parts. X-Git-Tag: emacs-pretest-21.0.90~1114 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=09cb76468520baac114cab02461d404acf87fc3b;p=emacs.git (define-derived-mode): Tweak generated docstring parts. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a68e9d0760e..8560b7d4ad1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2000-10-06 Miles Bader + * emacs-lisp/easy-mmode.el (define-derived-mode): Tweak generated + docstring parts. + * net/net-utils.el (nslookup-prompt-regexp, ftp-prompt-regexp) (smbclient-prompt-regexp): Add usage note to doc string. (ftp-font-lock-keywords, smbclient-font-lock-keywords): Removed. diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 46402aa53b1..60c613022e1 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -417,18 +417,20 @@ which more-or-less shadow %s's corresponding tables." ;; Make sure the docstring mentions the mode's hook (setq docstring (concat docstring - (unless (eq parent 'fundamental-mode) + (if (eq parent 'fundamental-mode) + "\n\nThis mode " (concat - "\nAdditionally to any hooks its parent mode " + "\n\nIn addition to any hooks its parent mode " (if (string-match (regexp-quote (format "`%s'" parent)) docstring) nil (format "`%s' " parent)) - "might have run),")) - (format "\nThis mode runs `%s' just before exiting." hook)))) + "might have run,\nthis mode ")) + (format "runs the hook `%s'" hook) + ", as the final step\nduring initialization."))) (unless (string-match "\\\\[{[]" docstring) ;; And don't forget to put the mode's keymap - (setq docstring (concat docstring "\n\\{" (symbol-name map) "}"))) + (setq docstring (concat docstring "\n\n\\{" (symbol-name map) "}"))) `(progn (defvar ,map (make-sparse-keymap))