Current File : //proc/self/root/kunden/usr/share/emacs/27.2/lisp/cedet/mode-local.elc |
;ELC
;;; Compiled
;;; in Emacs version 27.2
;;; with all optimizations.
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'find-func)
#@425 Run FUNCTION on every file buffer found.
FUNCTION does not have arguments; when it is entered `current-buffer'
is the currently selected file buffer.
If optional argument PREDICATE is non-nil, only select file buffers
for which the function PREDICATE returns non-nil.
If optional argument BUFFERS is non-nil, it is a list of buffers to
walk through. It defaults to `buffer-list'.
(fn FUNCTION &optional PREDICATE BUFFERS)
(defalias 'mode-local-map-file-buffers #[769 "\211\206 \300 \211\2050 \211@\301!\203) \302!\203) r\211q\210\203% \203( \210)A\266\202\202 \207" [buffer-list buffer-live-p buffer-file-name] 7 (#$ . 430)])
#@93 Return the mode parent of the major mode MODE.
Return nil if MODE has no parent.
(fn MODE)
(defalias 'get-mode-local-parent #[257 "\211\300N\206 \211\301N\207" [mode-local-parent derived-mode-parent] 3 (#$ . 1074)])
(put 'get-mode-local-parent 'byte-optimizer 'byte-compile-inline-expand)
#@83 Is the major-mode in the current buffer equivalent to a mode in MODES.
(fn MODE)
(defalias 'mode-local-equivalent-mode-p #[257 "\300\203 B\262\211\301N\206 \211\302N\262\262\202 \211\207" [nil mode-local-parent derived-mode-parent] 5 (#$ . 1371)])
#@160 Run FUNCTION on every file buffer with major mode in MODES.
MODES can be a symbol or a list of symbols.
FUNCTION does not have arguments.
(fn FUNCTION MODES)
(defalias 'mode-local-map-mode-buffers #[514 "\211C\211\242<\204 \211\242C\240\210\300\301\302\303\304\305!\306\"\307$\"\207" [mode-local-map-file-buffers make-byte-code 0 "\302 !\303\211\204 \203 @\300\242>\262A\262\202 \207" vconcat vector [major-mode mode-local-equivalent-mode-p nil] 4] 11 (#$ . 1637)])
#@99 Hook run after a new file buffer is created.
The current buffer is the newly created file buffer.
(defvar mode-local-init-hook nil (#$ . 2123))
#@58 List of buffers whose `major-mode' has changed recently.
(defvar mode-local-changed-mode-buffers nil (#$ . 2273))
(defvar mode-local--init-mode nil)
#@179 Return non-nil if mode local is initialized in current buffer.
That is, if the current `major-mode' is equal to the major mode for
which mode local bindings have been activated.
(defalias 'mode-local-initialized-p #[0 " =\207" [mode-local--init-mode major-mode] 2 (#$ . 2429)])
(put 'mode-local-initialized-p 'byte-optimizer 'byte-compile-inline-expand)
#@130 Initialize mode-local facilities.
This is run from `find-file-hook', and from `post-command-hook'
after changing the major mode.
(defalias 'mode-local-post-major-mode-change #[0 "\301\302\303\304#\210\304\305\306\307#\207" [mode-local-changed-mode-buffers remove-hook post-command-hook mode-local-post-major-mode-change nil mode-local-map-file-buffers #[0 "\300 \210\301\302!\207" [mode-local--activate-bindings run-hooks mode-local-init-hook] 2] #[0 " =?\207" [mode-local--init-mode major-mode] 2]] 5 (#$ . 2791)])
#@46 Function called in `change-major-mode-hook'.
(defalias 'mode-local-on-major-mode-change #[0 "p\211\235\203\f \210\202 \211B\210\301\302\303\304\305$\207" [mode-local-changed-mode-buffers add-hook post-command-hook mode-local-post-major-mode-change t nil] 5 (#$ . 3317)])
(byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias set-mode-local-parent mode-local--set-parent nil make-obsolete "27.1"] 4)
#@167 Set parent of major mode MODE to PARENT mode.
To work properly, this function should be called after PARENT mode
local variables have been defined.
(fn MODE PARENT)
(defalias 'mode-local--set-parent #[514 "\300\301#\210\302\303\"\207" [put mode-local-parent mode-local-map-mode-buffers mode-local--activate-bindings] 6 (#$ . 3740)])
(put 'mode-local--set-parent 'byte-optimizer 'byte-compile-inline-expand)
#@214 Make major mode MODE inherit behavior from PARENT mode.
DOCSTRING is optional and not used.
To work properly, this should be put after PARENT mode local variables
definition.
(fn MODE PARENT &optional DOCSTRING)
(defalias 'define-child-mode '(macro . #[770 "\300\301D\301DE\207" [mode-local--set-parent quote] 7 (#$ . 4158)]))
(make-obsolete 'define-child-mode 'define-derived-mode "27.1")
#@92 Return non-nil if THIS-MODE can use bindings of DESIRED-MODE.
(fn THIS-MODE DESIRED-MODE)
(defalias 'mode-local-use-bindings-p #[514 "\300\211\204 \203 =\262\211\301N\206 \211\302N\262\262\202 \211\207" [nil mode-local-parent derived-mode-parent] 6 (#$ . 4557)])
#@168 Buffer local mode bindings.
These symbols provide a hook for a `major-mode' to specify specific
behaviors. Use the function `mode-local-bind' to define new bindings.
(defvar mode-local-symbol-table nil (#$ . 4839))
(make-variable-buffer-local 'mode-local-symbol-table)
#@42 Major mode in which bindings are active.
(defvar mode-local-active-mode nil (#$ . 5115))
(byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias new-mode-local-bindings mode-local--new-bindings nil make-obsolete "27.1"] 4)
#@48 Return a new empty mode bindings symbol table.
(defalias 'mode-local--new-bindings #[0 "\300\301!\207" [obarray-make 13] 2 (#$ . 5354)])
(put 'mode-local--new-bindings 'byte-optimizer 'byte-compile-inline-expand)
#@787 Define BINDINGS in the specified environment.
BINDINGS is a list of (VARIABLE . VALUE).
Optional argument PLIST is a property list each VARIABLE symbol will
be set to. The following properties have special meaning:
- `constant-flag' if non-nil, prevent rebinding variables.
- `mode-variable-flag' if non-nil, define mode variables.
- `override-flag' if non-nil, define override functions.
The `override-flag' and `mode-variable-flag' properties are mutually
exclusive.
If optional argument MODE is non-nil, it must be a major mode symbol.
BINDINGS will be defined globally for this major mode. If MODE is
nil, BINDINGS will be defined locally in the current buffer, in
variable `mode-local-symbol-table'. The later should be done in MODE
hook.
(fn BINDINGS &optional PLIST MODE)
(defalias 'mode-local-bind #[769 "\301\302\"\203 \301\303\"\203 \304\305!\210\306\211\211\211\211\2031 \300N\206$ \307\310!\262\311\300#\210\202H \301\302\"\203= \304\312!\210\206F \307\310!\211\262\203\324 @\262A\262\313@!\262\211A\262\314\"\211\262\203\300 J\232\204H \315N\203\201 \304\316\"\210\202H \302N\203\227 \301\303\"\203\227 \304\317\"\210\202H \303N\203\255 \301\302\"\203\255 \304\320\"\210\202H \321\322 \323!\"\"\210L\210\202H \324\"\262\321\"\210L\210\202H \207" [mode-local-symbol-table plist-get mode-variable-flag override-flag error "Bindings can't be both overrides and mode variables" nil obarray-make 13 put "Mode required to bind mode variables" symbol-name intern-soft constant-flag "Can't change the value of constant `%s'" "Can't rebind override `%s' as a mode variable" "Can't rebind mode variable `%s' as an override" setplist append symbol-plist intern] 14 (#$ . 5574)])
#@354 Return the mode local symbol bound with SYMBOL's name.
Return nil if the mode local symbol doesn't exist.
If optional argument MODE is nil, lookup first into locally bound
symbols, then in those bound in current `major-mode' and its parents.
If MODE is non-nil, lookup into symbols bound in that major mode and
its parents.
(fn SYMBOL &optional MODE)
(defalias 'mode-local-symbol #[513 "\303!\304\204 \211\262\204 \262\n\205 \305\n\"\262\203G \211\204G \302N\2036 \305\302N\"\211\262\204 \211\306N\206@ \211\307N\262\262\202 \207" [mode-local-active-mode major-mode mode-local-symbol-table symbol-name nil intern-soft mode-local-parent derived-mode-parent] 8 (#$ . 7328)])
(put 'mode-local-symbol 'byte-optimizer 'byte-compile-inline-expand)
#@409 Return the value of the mode local symbol bound with SYMBOL's name.
If optional argument MODE is non-nil, restrict lookup to that mode and
its parents (see the function `mode-local-symbol' for more details).
If optional argument PROPERTY is non-nil the mode local symbol must
have that property set. Return nil if the symbol doesn't exist, or
doesn't have PROPERTY set.
(fn SYMBOL &optional MODE PROPERTY)
(defalias 'mode-local-symbol-value #[769 "\303!\304\204 \211\262\204 \262\n\205 \305\n\"\262\203I \211\204I \302N\2038 \305\302N\"\211\262\204 \211\306N\206B \211\307N\262\262\202 \266\203\211\262\205] \211\203[ N\205] J\207" [mode-local-active-mode major-mode mode-local-symbol-table symbol-name nil intern-soft mode-local-parent derived-mode-parent] 11 (#$ . 8100)])
(byte-code "\300\301\302\303#\210\304\305\306\307#\210\310\305\306\311#\207" [put mode-local-symbol-value byte-optimizer byte-compile-inline-expand defalias activate-mode-local-bindings mode-local--activate-bindings nil make-obsolete "27.1"] 4)
#@353 Activate variables defined locally in MODE and its parents.
That is, copy mode local bindings into corresponding buffer local
variables.
If MODE is not specified it defaults to current `major-mode'.
Return the alist of buffer-local variables that have been changed.
Elements are (SYMBOL . PREVIOUS-VALUE), describing one variable.
(fn &optional MODE)
(defalias 'mode-local--activate-bindings #[256 "\302\303!\203 \304 \207\305\211\211C\204 \306\301!\210\262\2034 B\262\211\307N\206- \211\310N\262\262\202 \211\203\\ \211@\211\311N\211\262\203U \312\313\314\315\316\317!\320\"\321\322%\"\210A\266\202\2025 \210\211\242\207" [major-mode mode-local--init-mode boundp keep-mode-if-same mode-local-on-major-mode-change nil make-local-variable mode-local-parent derived-mode-parent mode-local-symbol-table mapatoms make-byte-code 257 "\211\301N\205$ \302\303!!\304p\"\203 \300\211JB\300\242B\240\210\305!JL\262\207" vconcat vector [mode-variable-flag intern symbol-name local-variable-p make-local-variable] 5 "\n\n(fn VAR)"] 13 (#$ . 9156)])
(byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias deactivate-mode-local-bindings mode-local--deactivate-bindings nil make-obsolete "27.1"] 4)
#@231 Deactivate variables defined locally in MODE and its parents.
That is, kill buffer local variables set from the corresponding mode
local bindings.
If MODE is not specified it defaults to current `major-mode'.
(fn &optional MODE)
(defalias 'mode-local--deactivate-bindings #[256 "\211\204 \301\302!\210\262\303\205/ \304N\211\262\203 \305\306\"\210\211\307N\206( \211\310N\262\262\202\f \207" [major-mode kill-local-variable mode-local--init-mode nil mode-local-symbol-table mapatoms #[257 "\211\300N\205
\301\302\303!!!\207" [mode-variable-flag kill-local-variable intern symbol-name] 5 "\n\n(fn VAR)"] mode-local-parent derived-mode-parent] 5 (#$ . 10387)])
#@355 With the local bindings of MODE symbol, evaluate BODY.
The current mode bindings are saved, BODY is evaluated, and the saved
bindings are restored, even in case of an abnormal exit.
Value is what BODY returns.
This is like `with-mode-local', except that MODE's value is used.
To use the symbol MODE (quoted), use `with-mode-local'.
(fn MODE &rest BODY)
(defalias 'with-mode-local-symbol '(macro . #[385 "\300\301!\300\302!\300\303!\300\304!\305\306B\307B DE\310\311\312D\313\314E\313 \315\nDEBBBB\312D\316 D\317\320 D\321\nDEE\313\314E\315D\257E\207" [make-symbol "mode" "old-locals" "new-mode" "local" let (mode-local-active-mode) (nil) unwind-protect progn mode-local--deactivate-bindings setq mode-local-active-mode mode-local--activate-bindings dolist set car cdr] 17 (#$ . 11067)]))
(byte-code "\300\301\302\303#\300\207" [function-put with-mode-local-symbol lisp-indent-function 1] 4)
#@314 With the local bindings of MODE, evaluate BODY.
The current mode bindings are saved, BODY is evaluated, and the saved
bindings are restored, even in case of an abnormal exit.
Value is what BODY returns.
This is like `with-mode-local-symbol', except that MODE is quoted
and is not evaluated.
(fn MODE &rest BODY)
(defalias 'with-mode-local '(macro . #[385 "\300\301DBB\207" [with-mode-local-symbol quote] 5 (#$ . 11990)]))
(byte-code "\300\301\302\303#\300\207" [function-put with-mode-local lisp-indent-function 1] 4)
#@65 Return the value of the MODE local variable SYM.
(fn MODE SYM)
(defalias 'mode-local-value #[514 "\204 \303\304!\210\211\305\306!\307\204) \211\262\204) \262\n\205'