;ELC   
;;; Compiled
;;; in Emacs version 26.3
;;; 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 (#$ . 408)])
(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 (#$ . 652)])
(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 (#$ . 887)])
(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 (#$ . 1158)])
(put 'derived-mode-abbrev-table-name 'byte-optimizer 'byte-compile-inline-expand)
#@2113 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.
:after-hook FORM
	A single lisp form which is evaluated after the mode hooks have been
	run.  It should not be quoted.

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\211@ABCDEF\317	@!\203\261 	\211A\242\211G\320=\203p 	\211A\242@\202\255 G\321=\203\204 	\211A\242D\306C\202\255 G\322=\203\230 	\211A\242E\306B\202\255 G\323=\203\250 	\211A\242\202\255 	\211A\210)\202R \324\nED%\325\326A\327BB\330\331\332AD\333BB\334\332AD\335\336\337H\"FE\330\340\332FDD\334\332FD\341\332DFE\342\326F\343BBD\330\331\332FD\344BB\334\332FD\345\346\336\347\"DFEB\205C\325\326ED\330\340\332EDD\334\332ED\350\332DF\326E\351BBF\330\331\332ED\352BB\334\332ED\353\346\336\354\"DFEFC\205\207\325\326DD\330\340\332DDD\334\332DD\355\332DF\326D\325\356\332DD\357BBDEEF\330\331\332DD\360BB\334\332DD\361\346\336\362\"DFEF\334\332D\363\332\nDF@\205\235\334\332D\364@F\365\306\366\367\n\206\250\370C\371\372\332DE\371\373HE\n\205-\325\374\331\332\nD\375BB\334\332D\376\331\332\nD\377BBFE\330\201I FD\201J F\201K BBEB\205\201L \302\201M EDDC\330\201N \201O E\201P BBEEC\205+\330\201Q \201R D\201S BB\201T D\201U BBE\201V D\201W BBE\257\201X FDE\205>\201Y EDD\205J\371\201Z DE	BBBBBBBB\201[ \332ADD\205r\374\367\201\\ \201] \306E\201^ BBFCBBBBBBB\257.\207" [docstring body parent child mode after-hook nil fundamental-mode intern symbol-name "-map" "-syntax-table" "-abbrev-table" t "-hook" keywordp :group :abbrev-table :syntax-table :after-hook derived-mode-make-docstring progn defvar (nil) unless get quote ('variable-documentation) put 'variable-documentation 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.)" boundp 'definition-name with-no-warnings ((make-sparse-keymap)) ('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) group hook declare-syntax declare-abbrev abbrev syntax map #1=#:val name keymap-parent set-keymap-parent ((current-local-map)) let 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 push lambda (delayed-after-hook-functions)] 30 (#$ . 1433)]))
(byte-code "\300\301\302\303#\210\304\301\305\306#\300\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 (#$ . 6658)])
(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 or penultimate step\nduring initialization." "\\\\[{[]" "\n\n\\{" "}" abbrev syntax] 9 (#$ . 7107)])
#@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 (#$ . 8632)])
(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 (#$ . 8904)])
#@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 (#$ . 9833)])
#@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 (#$ . 10215)])
#@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 (#$ . 10619)])
#@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 (#$ . 10993)])
#@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 (#$ . 11196)])
#@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 (#$ . 11750)])
(defalias 'derived-mode-merge-abbrev-tables #[(old new) "\205 \301\302\"\207" [old mapatoms #[(symbol) "\302\303!	\"\206 \304	\303!JK$\207" [symbol new intern-soft symbol-name define-abbrev] 5]] 3])
(provide 'derived)
