aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2017-02-13 02:29:01 -0500
committerStefan Monnier2017-02-13 02:29:01 -0500
commit5c3105e55bd28f2d4786b798a11566f6876c237a (patch)
tree0716dac42ba9cee5a6430900b1c3dd6369dc4162
parent4c51ef4e803f9e956b2a1c1dc78ed50087c9507e (diff)
downloademacs-5c3105e55bd28f2d4786b798a11566f6876c237a.tar.gz
emacs-5c3105e55bd28f2d4786b798a11566f6876c237a.zip
* doc/lispref/modes.texi (Derived Modes): Make example more idiomatic
-rw-r--r--doc/lispref/modes.texi13
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 0015a9f318d..132dda3fc60 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -806,14 +806,15 @@ this mode. (Not all major modes have one.) The command
806Here is a hypothetical example: 806Here is a hypothetical example:
807 807
808@example 808@example
809(defvar hypertext-mode-map
810 (let ((map (make-sparse-keymap)))
811 (define-key map [down-mouse-3] 'do-hyper-link)
812 map))
813
809(define-derived-mode hypertext-mode 814(define-derived-mode hypertext-mode
810 text-mode "Hypertext" 815 text-mode "Hypertext"
811 "Major mode for hypertext. 816 "Major mode for hypertext."
812\\@{hypertext-mode-map@}" 817 (setq-local case-fold-search nil))
813 (setq case-fold-search nil))
814
815(define-key hypertext-mode-map
816 [down-mouse-3] 'do-hyper-link)
817@end example 818@end example
818 819
819Do not write an @code{interactive} spec in the definition; 820Do not write an @code{interactive} spec in the definition;