%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
;ELC ;;; Compiled ;;; in Emacs version 25.2.1 ;;; with all optimizations. ;;; This file contains utf-8 non-ASCII characters, ;;; and so cannot be loaded into Emacs 22 or earlier. (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (string-lessp emacs-version "23") (error "`%s' was compiled for Emacs 23 or later" #$)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #@50 Construct a mode-hook name based on a MODE name. (defalias 'derived-mode-hook-name #[(mode) "\301\302!\303P!\207" [mode intern symbol-name "-hook"] 3 (#$ . 410)]) (put 'derived-mode-hook-name 'byte-optimizer 'byte-compile-inline-expand) #@44 Construct a map name based on a MODE name. (defalias 'derived-mode-map-name #[(mode) "\301\302!\303P!\207" [mode intern symbol-name "-map"] 3 (#$ . 654)]) (put 'derived-mode-map-name 'byte-optimizer 'byte-compile-inline-expand) #@53 Construct a syntax-table name based on a MODE name. (defalias 'derived-mode-syntax-table-name #[(mode) "\301\302!\303P!\207" [mode intern symbol-name "-syntax-table"] 3 (#$ . 889)]) (put 'derived-mode-syntax-table-name 'byte-optimizer 'byte-compile-inline-expand) #@54 Construct an abbrev-table name based on a MODE name. (defalias 'derived-mode-abbrev-table-name #[(mode) "\301\302!\303P!\207" [mode intern symbol-name "-abbrev-table"] 3 (#$ . 1160)]) (put 'derived-mode-abbrev-table-name 'byte-optimizer 'byte-compile-inline-expand) #@1994 Create a new mode as a variant of an existing mode. The arguments to this command are as follow: 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") DOCSTRING: an optional documentation string--if you do not supply one, the function will attempt to invent something useful. BODY: forms to execute just before running the hooks for the new mode. Do not use `interactive' here. BODY can start with a bunch of keyword arguments. The following keyword arguments are currently understood: :group GROUP Declare the customization group that corresponds 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. :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. Here is how you could define LaTeX-Thesis mode as a variant of LaTeX mode: (define-derived-mode LaTeX-thesis-mode LaTeX-mode "LaTeX-Thesis") You could then make new key bindings for `LaTeX-thesis-mode-map' without changing regular LaTeX mode. In this example, BODY is empty, and DOCSTRING is generated by default. On a more complicated level, the following command uses `sgml-mode' as the parent, and then sets the variable `case-fold-search' to nil: (define-derived-mode article-mode sgml-mode "Article" "Major mode for editing technical articles." (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. The new mode runs the hook constructed by the function `derived-mode-hook-name'. See Info node `(elisp)Derived Modes' for more details. (defalias 'define-derived-mode '(macro . #[(child parent name &optional docstring &rest body) "\203 ;\204 B\306\n\307=\203 \306\310\311\f!\312P!)\310\311\f!\313P!)\310\311\f!\314P!)\315\211\310\311\f!\316P!)\306@ABCDE\317 @!\203\235 \211A\242\211F\320=\203l \211A\242\202\231 F\321=\203\200 \211A\242C\306B\202\231 F\322=\203\224 \211A\242D\306A\202\231 \211A\210)\202O \323\nDC%\324\325@\306\326\327G\"F\330\331\332EDD\333\332ED\334\332DFE\335\325E\336BBD\330\337\332ED\340BB\333\332ED\341\342\326\343\"DFEA\205\324\330\331\332DDD\333\332DD\344\332DFE\325D\345BB\330\337\332DD\346BB\333\332DD\347\342\326\350\"DFEFB\205Q\324\333\332CD\351\332DF\325C\324\352\332CD\353BBCEE\330\337\332CD\354BB\333\332CD\355\342\326\356\"DFEF\333\332D\357\332\nDF \205e\333\332D\360 F\361\306\362\363\n\206p\364C\365\366\332DE\365\367GE\n\205\355\324\370\337\332\nD\371BB\333\332D\372\337\332\nD\373BBFE\330\374ED\375E\376BBEA\205\302\377\302\201H DDDC\330\201I \201J D\201K BBEEB\205\353\330\201L \201M C\201N BB\201O C\201P BBE\201Q C\201R BBE\257\201S EDD\205\376\201T DDC\205\n\365\201U CE BBBBBBBB\201V \332@DD\257\257\n.\207" [docstring body parent child mode group nil fundamental-mode intern symbol-name "-map" "-syntax-table" "-abbrev-table" t "-hook" keywordp :group :abbrev-table :syntax-table derived-mode-make-docstring progn defvar format "Hook run after entering %s mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" unless boundp quote put 'definition-name with-no-warnings ((make-sparse-keymap)) get ('variable-documentation) 'variable-documentation purecopy "Keymap for `%s'." 'definition-name ((make-syntax-table)) ('variable-documentation) 'variable-documentation "Syntax table for `%s'." 'definition-name define-abbrev-table (nil) ('variable-documentation) 'variable-documentation "Abbrev table for `%s'." 'derived-mode-parent 'custom-mode-group defun (interactive) delay-mode-hooks kill-all-local-variables setq major-mode mode-name if ('mode-class) 'mode-class ('mode-class) keymap-parent set-keymap-parent ((current-local-map)) let hook declare-syntax declare-abbrev abbrev syntax map #1=#:val name char-table-parent (and parent (not (eq parent (standard-syntax-table)))) set-char-table-parent ((syntax-table)) or abbrev-table-get (:parents) eq (local-abbrev-table) abbrev-table-put (:parents (list local-abbrev-table)) use-local-map set-syntax-table local-abbrev-table run-mode-hooks] 29 (#$ . 1435)])) (byte-code "\300\301\302\303#\210\304\301\305\306#\207" [put define-derived-mode edebug-form-spec (&define name symbolp sexp [&optional stringp] [&rest keywordp sexp] def-body) function-put doc-string-elt 4] 4) #@266 Find the class of a major MODE. A mode's class is the first ancestor which is NOT a derived mode. Use the `derived-mode-parent' property of the symbol to trace backwards. Since major-modes might all derive from `fundamental-mode', this function is not very useful. (defalias 'derived-mode-class #[(mode) "\301N\203 \301N\211\202 \207" [mode derived-mode-parent] 3 (#$ . 6249)]) (make-obsolete 'derived-mode-class 'derived-mode-p "22.1") #@59 Construct a docstring for a new mode if none is provided. (defalias 'derived-mode-make-docstring #[(parent child &optional docstring syntax abbrev) "\306\307 !\310P!)\306\307 !\311P!)\f;\204\277 \204L \312\313$\2039 \312\314%\2032 \315\2023 \316$#\202: \317%\203G \312\320%\"\202H \317$\202\276 \312\321 $\203] %\203] \322\202p $\203f \323\202p %\203o \324\202p \317$\203\205 %\203\205 \312\325$%#\202\235 $\204\217 %\203\234 \312\326$\206\230 %\"\202\235 \317$\204\247 %\203\253 \317\202\254 \327 $\204\267 %\203\273 \327\202\274 \317&\330\331\307\n!!\f\"\204\360 \f \204\323 \332\202\351 \333\330\312\334\331\307 !!\"\f\"?\205\347 \312\335 \"\336Q\312\337\n\"\340R\330\341\f\"\204\377 \f\342\307!\343R\f*\207" [child mode hook map docstring parent intern symbol-name "-map" "-hook" format "Major-mode.\nUses keymap `%s'%s%s." "%s abbrev table `%s'" "," " and" "" " and syntax-table `%s'" "Major mode derived from `%s' by `define-derived-mode'.\nIt inherits all of the parent's attributes, but has its own keymap%s:\n\n `%s'%s\n\nwhich more-or-less shadow%s %s's corresponding table%s." ",\nabbrev table and syntax table" "\nand abbrev table" "\nand syntax table" ", `%s' and `%s'" " and `%s'" "s" string-match regexp-quote "\n\nThis mode " "\n\nIn addition to any hooks its parent mode " "[`‘]%s['’]" "`%s' " "might have run,\nthis mode " "runs the hook `%s'" ", as the final step\nduring initialization." "\\\\[{[]" "\n\n\\{" "}" abbrev syntax] 9 (#$ . 6698)]) #@55 Construct a setup-function name based on a MODE name. (defalias 'derived-mode-setup-function-name #[(mode) "\301\302!\303P!\207" [mode intern symbol-name "-setup"] 3 (#$ . 8208)]) (put 'derived-mode-setup-function-name 'byte-optimizer 'byte-compile-inline-expand) #@207 Initialize variables for a new MODE. Right now, if they don't already exist, set up a blank keymap, an empty syntax table, and an empty abbrev table -- these will be merged the first time the mode is used. (defalias 'derived-mode-init-mode-variables #[(mode) "\301\302\303!\304P!)!\2042 \305\306\302\303!\304P!)\307\310\311\"F!\210\312\302\303!\304P!)\313\314#\210\301\302\303!\315P!)!\204d \305\306\302\303!\315P!)\316\310\317\"F!\210\312\302\303!\315P!)\313\314#\210\301\302\303!\320P!)!\203u \314\207\305\306\302\303!\320P!)\321\310\322\"F!\207" [mode boundp intern symbol-name "-map" eval defvar (make-sparse-keymap) format "Keymap for %s." put derived-mode-unmerged t "-syntax-table" (make-char-table 'syntax-table nil) "Syntax table for %s." "-abbrev-table" (progn (define-abbrev-table (derived-mode-abbrev-table-name mode) nil) (make-abbrev-table)) "Abbrev table for %s."] 7 (#$ . 8480)]) #@64 Set the keymap of the new MODE, maybe merging with the parent. (defalias 'derived-mode-set-keymap #[(mode) "\304\305!\306P!)\307 !\310 \211\203! \311N\203! \312\n\"\210\313 \311\314#\210\315\n!+\207" [mode map-name new-map old-map intern symbol-name "-map" eval current-local-map derived-mode-unmerged derived-mode-merge-keymaps put nil use-local-map] 5 (#$ . 9409)]) #@70 Set the syntax table of the new MODE, maybe merging with the parent. (defalias 'derived-mode-set-syntax-table #[(mode) "\304\305!\306P!)\307 \310 ! \311N\203 \312\n\"\210\313 \311\314#\210\315!+\207" [mode table-name old-table new-table intern symbol-name "-syntax-table" syntax-table eval derived-mode-unmerged derived-mode-merge-syntax-tables put nil set-syntax-table] 4 (#$ . 9791)]) #@114 Set the abbrev table for MODE if it exists. Always merge its parent into it, since the merge is non-destructive. (defalias 'derived-mode-set-abbrev-table #[(mode) "\305\306!\307P!)\n\310 !\311\f\"\210\f\211+\207" [mode table-name local-abbrev-table old-table new-table intern symbol-name "-abbrev-table" eval derived-mode-merge-abbrev-tables] 3 (#$ . 10194)]) #@29 Run the mode hook for MODE. (defalias 'derived-mode-run-hooks #[(mode) "\302\303!\304P!)\305 !\205 \306 !)\207" [mode hooks-name intern symbol-name "-hook" boundp run-hooks] 3 (#$ . 10568)]) #@139 Merge an OLD keymap into a NEW one. The old keymap is set to be the last cdr of the new one, so that there will be automatic inheritance. (defalias 'derived-mode-merge-keymaps #[(old new) "\211:\203t @:\203/ \306 @@!\307\n\"\307\f\n\"\310!\203. \310 !\203. \311 \"\210+\312 @!\203m @GS\211\f\313Y\203l \306\f!\307\n\"\307\f\n\"\310!\203b \310 !\203b \311 \"\210+\fS\211\f\202= ) A\211\202 )GS\233\f\241\207" [new tail key subnew old subold vector lookup-key keymapp derived-mode-merge-keymaps vectorp 0 i] 4 (#$ . 10771)]) #@121 Merge an OLD syntax table into a NEW one. Where the new table already has an entry, nothing is copied from the old one. (defalias 'derived-mode-merge-syntax-tables #[(old new) "\302 \"\207" [new old set-char-table-parent] 3 (#$ . 11325)]) (defalias 'derived-mode-merge-abbrev-tables #[(old new) "\205 \301\302\"\207" [old mapatoms #[(symbol) "\302\303! \"\206 \304 \303!JK$\207" [symbol new intern-soft symbol-name define-abbrev] 5]] 3]) (provide 'derived)