mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-04 22:50:59 -08:00
Clarify define-derived-mode docstring
* lisp/emacs-lisp/derived.el (define-derived-mode): Doc fixes; correctly mention that the mode name is used in the mode line, clarify argument types, and how the mode hook is named. (Bug17567) (derived-mode-hook-name, derived-mode-map-name) (derived-mode-syntax-table-name, derived-mode-abbrev-table-name): Clarify that argument is a symbol.
This commit is contained in:
parent
4778e10572
commit
80fddff5d6
1 changed files with 11 additions and 11 deletions
|
|
@ -94,19 +94,19 @@
|
|||
;;; PRIVATE: defsubst must be defined before they are first used
|
||||
|
||||
(defsubst derived-mode-hook-name (mode)
|
||||
"Construct a mode-hook name based on a MODE name."
|
||||
"Construct a mode-hook name based on the symbol MODE."
|
||||
(intern (concat (symbol-name mode) "-hook")))
|
||||
|
||||
(defsubst derived-mode-map-name (mode)
|
||||
"Construct a map name based on a MODE name."
|
||||
"Construct a map name based on the symbol MODE."
|
||||
(intern (concat (symbol-name mode) "-map")))
|
||||
|
||||
(defsubst derived-mode-syntax-table-name (mode)
|
||||
"Construct a syntax-table name based on a MODE name."
|
||||
"Construct a syntax-table name based on the symbol MODE."
|
||||
(intern (concat (symbol-name mode) "-syntax-table")))
|
||||
|
||||
(defsubst derived-mode-abbrev-table-name (mode)
|
||||
"Construct an abbrev-table name based on a MODE name."
|
||||
"Construct an abbrev-table name based on the symbol MODE."
|
||||
(intern (concat (symbol-name mode) "-abbrev-table")))
|
||||
|
||||
;; PUBLIC: define a new major mode which inherits from an existing one.
|
||||
|
|
@ -120,7 +120,7 @@ The arguments are as follows:
|
|||
CHILD: the name of the command for the derived mode.
|
||||
PARENT: the name of the command for the parent mode (e.g. `text-mode')
|
||||
or nil if there is no parent.
|
||||
NAME: a string which will appear in the status line (e.g. \"Hypertext\")
|
||||
NAME: a string that will appear in the mode line (e.g. \"HTML\")
|
||||
DOCSTRING: an optional documentation string--if you do not supply one,
|
||||
the function will attempt to invent something useful.
|
||||
KEYWORD-ARGS:
|
||||
|
|
@ -132,12 +132,12 @@ KEYWORD-ARGS:
|
|||
to this mode. The command `customize-mode' uses this.
|
||||
:syntax-table TABLE
|
||||
Use TABLE instead of the default (CHILD-syntax-table).
|
||||
A nil value means to simply use the same syntax-table
|
||||
as the parent.
|
||||
TABLE should be an unquoted symbol. A nil value means
|
||||
to simply use the same syntax-table as the parent.
|
||||
:abbrev-table TABLE
|
||||
Use TABLE instead of the default (CHILD-abbrev-table).
|
||||
A nil value means to simply use the same abbrev-table
|
||||
as the parent.
|
||||
TABLE should be an unquoted symbol. A nil value means
|
||||
to simply use the same abbrev-table as the parent.
|
||||
:after-hook FORM
|
||||
A single Lisp form which is evaluated after the mode
|
||||
hooks have been run. It should not be quoted.
|
||||
|
|
@ -166,8 +166,8 @@ the parent, and then sets the variable `case-fold-search' to nil:
|
|||
Note that if the documentation string had been left out, it would have
|
||||
been generated automatically, with a reference to the keymap.
|
||||
|
||||
The new mode runs the hook constructed by the function
|
||||
`derived-mode-hook-name'.
|
||||
The new mode runs the hook named MODE-hook. For `foo-mode',
|
||||
the hook will be named `foo-mode-hook'.
|
||||
|
||||
See Info node `(elisp)Derived Modes' for more details.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue