1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-04 20:27:45 +00:00

* doc/lispref/modes.texi (Derived Modes): Make example more idiomatic

This commit is contained in:
Stefan Monnier 2017-02-13 02:29:01 -05:00
parent 4c51ef4e80
commit 5c3105e55b

View File

@ -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;