Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
8d11b450
Commit
8d11b450
authored
Jul 23, 2003
by
Glenn Morris
Browse files
(define-derived-mode): Mention hook in doc string. Defvar the derived
hook.
parent
95c2e3e4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
lisp/emacs-lisp/derived.el
lisp/emacs-lisp/derived.el
+5
-1
No files found.
lisp/emacs-lisp/derived.el
View file @
8d11b450
...
...
@@ -155,7 +155,10 @@ the parent, and then sets the variable `case-fold-search' to nil:
(setq case-fold-search nil))
Note that if the documentation string had been left out, it would have
been generated automatically, with a reference to the keymap."
been generated automatically, with a reference to the keymap.
The new mode runs the hook constructed by the function
`derived-mode-hook-name'."
(
declare
(
debug
(
&define
name
symbolp
sexp
[&optional
stringp]
[&rest
keywordp
sexp]
def-body
)))
...
...
@@ -187,6 +190,7 @@ been generated automatically, with a reference to the keymap."
parent
child
docstring
syntax
abbrev
))
`
(
progn
(
defvar
,
hook
nil
,
(
format
"Hook run when entering %s mode."
name
))
(
defvar
,
map
(
make-sparse-keymap
))
,
(
if
declare-syntax
`
(
defvar
,
syntax
(
make-syntax-table
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment