[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111020: derived-mode-make-docstring
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111020: derived-mode-make-docstring tweak for bug#11277 |
Date: |
Tue, 27 Nov 2012 11:40:04 -0500 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111020
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2012-11-27 11:40:04 -0500
message:
derived-mode-make-docstring tweak for bug#11277
* lisp/emacs-lisp/derived.el (derived-mode-make-docstring):
Don't mention "abbrev" or "syntax" if nil.
modified:
lisp/ChangeLog
lisp/emacs-lisp/derived.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-11-27 03:10:32 +0000
+++ b/lisp/ChangeLog 2012-11-27 16:40:04 +0000
@@ -1,3 +1,8 @@
+2012-11-27 Glenn Morris <address@hidden>
+
+ * emacs-lisp/derived.el (derived-mode-make-docstring):
+ Don't mention "abbrev" or "syntax" if nil. (Bug#11277)
+
2012-11-27 Stefan Monnier <address@hidden>
* textmodes/table.el (table-insert): Don't use `symbol-name' on
=== modified file 'lisp/emacs-lisp/derived.el'
--- a/lisp/emacs-lisp/derived.el 2012-09-25 04:13:02 +0000
+++ b/lisp/emacs-lisp/derived.el 2012-11-27 16:40:04 +0000
@@ -295,16 +295,32 @@
;; Use a default docstring.
(setq docstring
(if (null parent)
- (format "Major-mode.
-Uses keymap `%s', abbrev table `%s' and syntax-table `%s'." map abbrev syntax)
+ ;; FIXME filling.
+ (format "Major-mode.\nUses keymap `%s'%s%s." map
+ (if abbrev (format "%s abbrev table `%s'"
+ (if syntax "," " and") abbrev) "")
+ (if syntax (format " and syntax-table `%s'" syntax) ""))
(format "Major mode derived from `%s' by `define-derived-mode'.
-It inherits all of the parent's attributes, but has its own keymap,
-abbrev table and syntax table:
-
- `%s', `%s' and `%s'
-
-which more-or-less shadow %s's corresponding tables."
- parent map abbrev syntax parent))))
+It inherits all of the parent's attributes, but has its own keymap%s:
+
+ `%s'%s
+
+which more-or-less shadow%s %s's corresponding table%s."
+ parent
+ (cond ((and abbrev syntax)
+ ",\nabbrev table and syntax table")
+ (abbrev "\nand abbrev table")
+ (syntax "\nand syntax table")
+ (t ""))
+ map
+ (cond ((and abbrev syntax)
+ (format ", `%s' and `%s'" abbrev syntax))
+ ((or abbrev syntax)
+ (format " and `%s'" (or abbrev syntax)))
+ (t ""))
+ (if (or abbrev syntax) "" "s")
+ parent
+ (if (or abbrev syntax) "s" "")))))
(unless (string-match (regexp-quote (symbol-name hook)) docstring)
;; Make sure the docstring mentions the mode's hook.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111020: derived-mode-make-docstring tweak for bug#11277,
Glenn Morris <=