* doc/lispref/modes.texi (Derived Modes): Make example more idiomatic
This commit is contained in:
parent
4c51ef4e80
commit
5c3105e55b
1 changed files with 7 additions and 6 deletions
|
@ -806,14 +806,15 @@ this mode. (Not all major modes have one.) The command
|
|||
Here is a hypothetical example:
|
||||
|
||||
@example
|
||||
(defvar hypertext-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [down-mouse-3] 'do-hyper-link)
|
||||
map))
|
||||
|
||||
(define-derived-mode hypertext-mode
|
||||
text-mode "Hypertext"
|
||||
"Major mode for hypertext.
|
||||
\\@{hypertext-mode-map@}"
|
||||
(setq case-fold-search nil))
|
||||
|
||||
(define-key hypertext-mode-map
|
||||
[down-mouse-3] 'do-hyper-link)
|
||||
"Major mode for hypertext."
|
||||
(setq-local case-fold-search nil))
|
||||
@end example
|
||||
|
||||
Do not write an @code{interactive} spec in the definition;
|
||||
|
|
Loading…
Add table
Reference in a new issue