MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 3.147.48.161
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/emacs-lisp/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/emacs-lisp/easy-mmode.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:09:01 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp/easy-mmode.el
;;; in Emacs version 24.3.1
;;; 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.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


#@202 Turn the symbol MODE into a string intended for the user.
If provided, LIGHTER will be used to help choose capitalization by,
replacing its case-insensitive matches with the literal string in LIGHTER.
(defalias 'easy-mmode-pretty-mode-name #[(mode &optional lighter) "\304\305\306\307\310\305\311\312\313	!#!#\314P;\204\n\202*\305\315\312#\305\316!\n\304\211%*\207" [case-fold-search mode name lighter t replace-regexp-in-string "-Minor" " minor" capitalize "toggle-\\|-mode\\'" "" symbol-name " mode" "\\`\\s-+\\|\\s-+\\'" regexp-quote] 9 (#$ . 565)])
(defalias 'easy-mmode-define-minor-mode 'define-minor-mode)
#@3100 Define a new minor mode MODE.
This defines the toggle command MODE and (by default) a control variable
MODE (you can override this with the :variable keyword, see below).
DOC is the documentation for the mode toggle command.

The defined mode command takes one optional (prefix) argument.
Interactively with no prefix argument, it toggles the mode.
A prefix argument enables the mode if the argument is positive,
and disables it otherwise.

When called from Lisp, the mode command toggles the mode if the
argument is `toggle', disables the mode if the argument is a
non-positive integer, and enables the mode otherwise (including
if the argument is omitted or nil or a positive integer).

If DOC is nil, give the mode command a basic doc-string
documenting what its argument does.

Optional INIT-VALUE is the initial value of the mode's variable.
Optional LIGHTER is displayed in the mode line when the mode is on.
Optional KEYMAP is the default keymap bound to the mode keymap.
  If non-nil, it should be a variable name (whose value is a keymap),
  or an expression that returns either a keymap or a list of
  arguments for `easy-mmode-define-keymap'.  If you supply a KEYMAP
  argument that is not a symbol, this macro defines the variable
  MODE-map and gives it the value that KEYMAP specifies.

BODY contains code to execute each time the mode is enabled or disabled.
  It is executed after toggling the mode, and before running MODE-hook.
  Before the actual body code, you can write keyword arguments, i.e.
  alternating keywords and values.  These following special keywords
  are supported (other keywords are passed to `defcustom' if the minor
  mode is global):

:group GROUP	Custom group name to use in all generated `defcustom' forms.
		Defaults to MODE without the possible trailing "-mode".
		Don't use this default group name unless you have written a
		`defgroup' to define that group properly.
:global GLOBAL	If non-nil specifies that the minor mode is not meant to be
		buffer-local, so don't make the variable MODE buffer-local.
		By default, the mode is buffer-local.
:init-value VAL	Same as the INIT-VALUE argument.
		Not used if you also specify :variable.
:lighter SPEC	Same as the LIGHTER argument.
:keymap MAP	Same as the KEYMAP argument.
:require SYM	Same as in `defcustom'.
:variable PLACE	The location to use instead of the variable MODE to store
		the state of the mode.	This can be simply a different
		named variable, or a generalized variable.
		PLACE can also be of the form (GET . SET), where GET is
		an expression that returns the current state, and SET is
		a function that takes one argument, the new state, and
		sets it.  If you specify a :variable, this function does
		not define a MODE variable (nor any of the terms used
		in :variable).

:after-hook     A single lisp form which is evaluated after the mode hooks
                have been run.  It should not be quoted.

For example, you could write
  (define-minor-mode foo-mode "If enabled, foo on you!"
    :lighter " Foo" :require 'foo :global t :group 'hassle :version "27.5"
    ...BODY CODE...)
(defalias 'define-minor-mode '(macro . #[(mode doc &optional init-value lighter keymap &rest body) "\306!\203	\nBBB\307\211\307\2026\306	!\203*	\nBB\307\211\2026\306\n!\2036\nB\307\310\311!\312
!@\313
	\"A\307\211BC\307\211DE\307\211FG\307\211HI\307J
K\314L\307M\315@\316P!N\315@\317P!O\315@\320P!P\307\211QR\307S\306@\211Q!\203\245AQ\321=\203\247\211A@\202\212Q\322=\203\271\323\211A@!\202\212Q\324=\203\312\211A@B\202\212Q\325=\203\333\211A@G\202\212Q\326=\203\356\326\211A@DC\202\212Q\327=\203\327\211A@DD\202\212Q\330=\203E\330\211A@D\244E\202\212Q\331=\203*\331\211A@DF\202\212Q\332=\203;\211A@L\202\212Q\333=\203K\211A@\202\212Q\334=\203\200\211A@\211I\243\211S\203nS9\204t\335S!\204tI\202\212I@IAJ\202\212Q\336=\203\221\211A@M\202\212QHBH\211A@HBH\202\212\n\203\262\n9\203\262\n\202\270\315@\337P!RC\204\302\340CD\204\312\341DE\204\335\330\342\315\343\344\345@#!DDEF\204\345\346F\347I\203\357\307\202<B\204	\347\350\351
\352\353A
#F\354\342
DDF\202<\355\205\356PT\357
\352TA
\211$\360CDEFL\314=?\2052\332LDH\237&)BBBB\361K\362\363GBBU\206R\352\364A\211R$\365\366\f\367BC\360J\203g\370\371JDD\202s
9\203p\372\202q\373
D\374\375\376
D\377BBBC\"\360\201V\342ND\374
\342OD\342PDFE\374\201W\347B\205\251
9\205\251\201X\342
DD\201Y\201Z\201[\376\201\\\f\201]BBDE\201^\352\201_A\"\374
\201`BBEEEEDM\205\334MC#BBB\201a
\257\350\n9?\205\351R\366\201b\nDC\201cBB\352\201d@\"F
9\204	\204\n\205M\201e\201f
\"\202M\201g\201h\342
D\342	D\n\2031R\202=\374\201i\342RDDRE\307
K=?\205J\342KD\257D\257.\207" [init-value lighter keymap body last-message mode keywordp nil make-symbol "last-message" symbol-name easy-mmode-pretty-mode-name t intern "-hook" "-on-hook" "-off-hook" :init-value :lighter purecopy :global :extra-args :set :initialize :group :type :require :keymap :variable functionp :after-hook "-map" (:set 'custom-set-minor-mode) (:initialize 'custom-initialize-default) quote replace-regexp-in-string "-mode\\'" "" (:type 'boolean) progn :autoload-end defvar format "Non-nil if %s is enabled.\nUse the command `%s' to change this variable." make-variable-buffer-local "Non-nil if %s is enabled.\nSee the command `%s' for a description of this minor mode." "\nSetting this variable directly does not take effect;\neither customize it (see the info node `Easy Customization')\nor call the function `%s'." defcustom append defun &optional arg "Toggle %s on or off.\nWith a prefix argument ARG, enable %s if ARG is\npositive, and disable it otherwise.  If called from Lisp, enable\nthe mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.\n\\{%s}" (interactive (list (or current-prefix-arg 'toggle))) let ((current-message)) funcall function setq setf if (eq arg 'toggle) not ((> (prefix-numeric-value arg) 0)) mode-name pretty-name globalp set initialize group type extra-args extra-keywords variable setter modefun require after-hook hook hook-on hook-off keyw keymap-sym tmp base-doc-string doc run-hooks (called-interactively-p 'any) customize-mark-as-set unless and (current-message) equal ((current-message)) message "%s %%sabled" ("en" "dis") (force-mode-line-update) m ((cond ((keymapp m) m) ((listp m) (easy-mmode-define-keymap m)) (t (error "Invalid keymap %S" m)))) "Keymap for `%s'." error ":lighter and :keymap unsupported with mode expression %s" with-no-warnings add-minor-mode boundp] 25 (#$ . 1196)]))
(byte-code "\300\301\302\303#\210\300\301\304\305#\210\306\307\310\"\210\306\311\310\"\207" [put define-minor-mode doc-string-elt 2 edebug-form-spec (&define name stringp [&optional [&not keywordp] sexp &optional [&not keywordp] sexp &optional [&not keywordp] sexp] [&rest [keywordp sexp]] def-body) defalias easy-mmode-define-global-mode define-globalized-minor-mode define-global-minor-mode] 4)
#@1046 Make a global mode GLOBAL-MODE corresponding to buffer-local minor MODE.
TURN-ON is a function that will be called with no args in every buffer
  and that should try to turn MODE on if applicable for that buffer.
KEYS is a list of CL-style keyword arguments.  As the minor mode
  defined by this function is always global, any :global keyword is
  ignored.  Other keywords have the same meaning as in `define-minor-mode',
  which see.  In particular, :group specifies the custom group.
  The most useful keywords are those that are passed on to the
  `defcustom'.  It normally makes no sense to pass the :lighter
  or :keymap keywords to `define-globalized-minor-mode', since these
  are usually passed to the buffer-local version of the minor mode.

If MODE's set-up depends on the major mode in effect when it was
enabled, then disabling and reenabling MODE should make MODE work
correctly with the current major mode.  This is important to
prevent problems with derived modes, that is, major modes that
call another major mode in their body.
(defalias 'define-globalized-minor-mode '(macro . #[(global-mode mode turn-on &rest keys) "\306!\307\n!\307!\310\211@\311	\312P!A\311	\313P!B\311	\314P!C\311	\315P!D\311\306\n!\316P!E\310F\317G@\211F!\203\204GAGF\320=\203_
\320G\211AG@D\244\2029F\321=\203nGAG\2029F@B@G\211AG@@B@\2029
\204\226\320\322\311\323\324\325\306\n!#!DD\326\211\327\330E\331BB\332\322EDDF\333\334\335\fH\n&\321\336\337
@\237\340\326\341\342\322BDE\341\343\322BDE\341\344\322CDE\341\345\322DDE\257\346\347\322BDE\346\350\322BDE\346\351\322CDE\346\352\322DDE\257\353\354\355\356\340HC\357\n\211\360BEFEED#BBBBB\327\330A\361BB\362B\310\353\356AD\357\363\355\356\364\365E\366BB\340\n\326\n\367BHC\370E\371BBFHC\370E\372BB\257EEEEF\373\322BD\374\322DF\362C\310BC\370A\375BB\346\376\322CDE\257\373\322CD\377\322DF\362D\310\201I\322AD\201JBB\341\201K\322CDE\257\373\322DD\201L\322DF\257.\207" [global-mode global-mode-name mode pretty-name pretty-global-name group symbol-name easy-mmode-pretty-mode-name nil intern "-buffers" "-enable-in-buffers" "-check-buffers" "-cmhh" "-major-mode" keywordp :group :global quote replace-regexp-in-string "-mode\\'" "" progn :autoload-end defvar (nil) make-variable-buffer-local define-minor-mode format "Toggle %s in all buffers.\nWith prefix ARG, enable %s if ARG is positive;\notherwise, disable it.  If called from Lisp, enable the mode if\nARG is omitted or nil.\n\n%s is enabled in all buffers where\n`%s' would do it.\nSee `%s' for more information on %s." t append if add-hook 'after-change-major-mode-hook 'change-major-mode-after-body-hook 'find-file-hook 'change-major-mode-hook remove-hook 'after-change-major-mode-hook 'change-major-mode-after-body-hook 'find-file-hook 'change-major-mode-hook dolist (buf (buffer-list)) with-current-buffer buf when (-1) (nil) defun (buffer-live-p buf) unless eq (major-mode) (-1) setq (major-mode) (major-mode) put 'definition-name (nil) 'post-command-hook 'definition-name extra-keywords MODE-buffers MODE-enable-in-buffers MODE-check-buffers MODE-cmhh MODE-major-mode keyw keys turn-on add-to-list ((current-buffer)) 'post-command-hook 'definition-name] 25 (#$ . 8282)]))
(byte-code "\300\301\302\303#\210\304\305!\203\306\307\305\"\210\202\306\307\310\"\210\300\207" [put define-globalized-minor-mode doc-string-elt 2 fboundp set-keymap-parents defalias easy-mmode-set-keymap-parents #[(m parents) "\302	:\204	\202$	A\204	@\202$\303	\211A@!\304	\"\210)\"\207" [m parents set-keymap-parent copy-keymap easy-mmode-set-keymap-parents] 5]] 4)
#@589 Return a keymap built from bindings BS.
BS must be a list of (KEY . BINDING) where
KEY and BINDINGS are suitable for `define-key'.
Optional NAME is passed to `make-sparse-keymap'.
Optional map M can be used to modify an existing map.
ARGS is a list of additional keyword arguments.

Valid keywords and arguments are:

  :name      Name of the keymap; overrides NAME argument.
  :dense     Non-nil for a dense keymap.
  :inherit   Parent keymap.
  :group     Ignored.
  :suppress  Non-nil to call `suppress-keymap' on keymap,
             'nodigits to suppress digits as prefix arguments.
(defalias 'easy-mmode-define-keymap #[(bs &optional name m args) "\306\211\211\203R\211A@\211A@\211\307=\203\"\f\202N
\310=\203-\f\202N
\311=\2038\f\202N
\312=\203C\f\202N
\313=\204N\314\315
\"\210*\202\316!\204r\317\"	\203l\320!\202p\321!\203~\322\323=\"\210\306\211\203@\211@A\211 :\203\241 \202\244 C\306\211\203@\2119\203\302\324
!$\210\202\376\204\334\316\325
\"!\204\376\326
#\210\202\376\325
\"\211\"?\206\362\"\247\206\362\"\327=)\203\376\326
#\210A\211\204\254,A\211\204\211*\316\n!\203!\330\n\"\210\202,\n:\203,\331\n\"\210+\207" [suppress dense inherit args val key nil :name :dense :inherit :suppress :group message "Unknown argument %s in defmap" keymapp append make-keymap make-sparse-keymap suppress-keymap nodigits substitute-key-definition lookup-key define-key undefined set-keymap-parent easy-mmode-set-keymap-parents name m bs b --dolist-tail-- binding keys global-map o] 6 (#$ . 11935)])
#@172 Define a constant M whose value is the result of `easy-mmode-define-keymap'.
The M, BS, and ARGS arguments are as per that function.  DOC is
the constant's documentation.
(defalias 'easy-mmode-defmap '(macro . #[(m bs doc &rest args) "\304\305	\306\307\310\311DDE\312\nB\257F\207" [m bs args doc defconst easy-mmode-define-keymap nil if boundp quote list] 9 (#$ . 13566)]))
(defalias 'easy-mmode-define-syntax #[(css args) "\306\307\310\"!\307\311\"\312\211\203?
@\211@\fA\313!\203/\314\315\"\210\2027\316\n#\210*
A\211\204*	\203S\317\n	9\203P	J\202Q	\"\210\n*\207" [args parent st css cs --dolist-tail-- make-syntax-table plist-get :copy :inherit nil sequencep mapc #[(c) "\303	\n#\207" [c syntax st modify-syntax-entry] 4] modify-syntax-entry set-char-table-parent syntax char] 5])
#@113 Define variable ST as a syntax-table.
CSS contains a list of syntax specifications of the form (CHAR . SYNTAX).
(defalias 'easy-mmode-defsyntax '(macro . #[(st css doc &rest args) "\304\305\306\307	\310\nBEFE\207" [st css args doc progn (autoload 'easy-mmode-define-syntax "easy-mmode") defconst easy-mmode-define-syntax list] 8 (#$ . 14392)]))
#@691 Define BASE-next and BASE-prev to navigate in the buffer.
RE determines the places the commands should move point to.
NAME should describe the entities matched by RE.  It is used to build
  the docstrings of the two functions.
BASE-next also tries to make sure that the whole entry is visible by
  searching for its end (by calling ENDFUN if provided or by looking for
  the next entry) and recentering if necessary.
ENDFUN should return the end position (with or without moving point).
NARROWFUN non-nil means to check for narrowing before moving, and if
found, do `widen' first and then call NARROWFUN with no args after moving.
BODY is executed after moving to the destination location.
(defalias 'easy-mmode-define-navigation '(macro . #[(base re &optional name endfun narrowfun &rest body) "\306!\307	\310P!\307	\311P!\312
\204	\313\314\315\316\317
\"\320\321\322\323\n\324B\322\3256D\326BB\f\322\327\3306\331BBD\322\3256D\332\3337\205H7C\334BBD\335\336
EF\337\340\341\342\343\333\3447\203c7C\202i\3306\345BBD\346BBDC\347BBE\257!8BBBBB\257\350\351D\352\351DF\314\n\353\316\354
\206\222	\"\355\356\322\357\360B\f\361\3626\363BB\335\364
EE!8BBBB\257\350\351\nD\365\351DF\257,\207" [base base-name prev-sym next-sym when-narrowed name symbol-name intern "-prev" "-next" #[(body) "\204	\207\302\303	\304\305CEF\207" [narrowfun body let ((was-narrowed (prog1 (or (< (- (point-max) (point-min)) (buffer-size))) (widen)))) when was-narrowed] 6] progn defun (&optional count) format "Go to the next COUNT'th %s." (interactive "p") (unless count (setq count 1)) if (< count 0) ((- count)) looking-at ((setq count (1+ count))) not re-search-forward (nil t count) goto-char or ((point-max)) user-error "No next %s" (goto-char (match-beginning 0)) when (and (eq (current-buffer) (window-buffer (selected-window))) (called-interactively-p 'interactive)) let endpt save-excursion (nil t 2) ((point-max)) ((unless (pos-visible-in-window-p endpt nil t) (recenter '(0)))) put quote 'definition-name (&optional count) "Go to the previous COUNT'th %s" (interactive "p") (unless count (setq count 1)) (< count 0) ((- count)) unless re-search-backward (nil t count) "No previous %s" 'definition-name re endfun body] 25 (#$ . 14746)]))
(byte-code "\300\301\302\303#\210\300\301\304\305#\210\306\307!\207" [put easy-mmode-define-navigation lisp-indent-function 5 edebug-form-spec (exp exp exp def-form def-form &rest def-body) provide easy-mmode] 4)

MMCT - 2023