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/advice.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:08:57 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp/advice.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.

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


(byte-code "\300\301!\210\302\301\303\"\210\302\304!\210\302\305!\210\306\307\310\311\312\313\314\315\316\317&	\207" [provide advice-preload require "advice.el" macroexp cl-lib custom-declare-group advice nil "An overloading mechanism for Emacs Lisp functions." :prefix "ad-" :link (custom-manual "(elisp)Advising Functions") :group lisp] 10)
(defconst ad-version "2.14")
(byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\313\306\307&\207" [custom-declare-variable ad-redefinition-action 'warn "Defines what to do with redefinitions during Advice de/activation.\nRedefinition occurs if a previously activated function that already has an\noriginal definition associated with it gets redefined and then de/activated.\nIn such a case we can either accept the current definition as the new\noriginal definition, discard the current definition and replace it with the\nold original, or keep it and raise an error.  The values `accept', `discard',\n`error' or `warn' govern what will be done.  `warn' is just like `accept' but\nit additionally prints a warning message.  All other values will be\ninterpreted as `error'." :type (choice (const accept) (const discard) (const warn) (other :tag "error" error)) :group advice ad-default-compilation-action 'maybe "Defines whether to compile advised definitions during activation.\nA value of `always' will result in unconditional compilation, `never' will\nalways avoid compilation, `maybe' will compile if the byte-compiler is already\nloaded, and `like-original' will compile if the original definition of the\nadvised function is compiled or a built-in function.  Every other value will\nbe interpreted as `maybe'.  This variable will only be considered if the\nCOMPILE argument of `ad-activate' was supplied as nil." (choice (const always) (const never) (const like-original) (other :tag "maybe" maybe))] 8)
#@379 Substitute qualifying subTREEs with result of FUNCTION(subTREE).
Only proper subtrees are considered, for example, if TREE is (1 (2 (3)) 4)
then the subtrees will be 1 (2 (3)) 2 (3) 3 4, dotted structures are
allowed too.  Once a qualifying subtree has been found its subtrees will
not be considered anymore.  (ad-substitute-tree 'atom 'identity tree)
generates a copy of TREE.
(defalias 'ad-substitute-tree #[(sUbTrEe-TeSt fUnCtIoN tReE) ":\203,	@!\203\n@!\202$@:\203\"\303	\n@#\202$@\303	\nA#B\207	!\2036\n!\207\207" [tReE sUbTrEe-TeSt fUnCtIoN ad-substitute-tree] 5 (#$ . 2436)])
(defalias 'ad-save-real-definition '(macro . #[(function) "\302\303\304\"!\305\306\307\"\210\310\311\312\313	DDD\314\315\313	D\316\313DDE\317\306N\2052\320\313	D\321\313\306NDFC\322N\205D\320\313	D\323\313\322NDFC\"BBE)\207" [function saved-function intern format "ad-real-%s" require byte-compile "bytecomp" if not fboundp quote progn fset symbol-function append put 'byte-compile byte-opcode 'byte-opcode] 12]))
(defalias 'ad-save-real-definitions #[nil "\300\301!\204\301\302KM\210\303\301\304\305#\210\303\301\306\307#\210\300\310!?\205\"\310\311KM\207" [fboundp ad-real-fset fset put byte-compile byte-compile-fset byte-opcode byte-fset ad-real-documentation documentation] 4])
(ad-save-real-definitions)
(defvar ad-advised-functions nil)
#@66 Add FUNCTION to `ad-advised-functions' unless its already there.
(defalias 'ad-pushnew-advised-function '(macro . #[(function) "\301\302\303\304D\305BBD\306\307\310\311\304DD\312BBEE\207" [function if not assoc symbol-name (ad-advised-functions) setq ad-advised-functions cons list (ad-advised-functions)] 8 (#$ . 3798)]))
#@46 Remove FUNCTION from `ad-advised-functions'.
(defalias 'ad-pop-advised-function '(macro . #[(function) "\301\302\303\304\305D\306BB\307BBE\207" [function setq ad-advised-functions delq assoc symbol-name (ad-advised-functions) (ad-advised-functions)] 6 (#$ . 4129)]))
#@209 `dolist'-style iterator that maps over `ad-advised-functions'.
(ad-do-advised-functions (VAR [RESULT-FORM])
   BODY-FORM...)
On each iteration VAR will be bound to the name of an advised function
(a symbol).
(defalias 'ad-do-advised-functions '(macro . #[(varform &rest body) "\302@\303A@E\304@\305\306@DDE	BBB\207" [varform body cl-dolist ad-advised-functions setq intern car] 7 (#$ . 4404)]))
(put 'ad-do-advised-functions 'lisp-indent-function 1)
(defalias 'ad-get-advice-info #[(function) "\301N\207" [function ad-advice-info] 2])
(defalias 'ad-get-advice-info-macro '(macro . #[(function) "\301\302BB\207" [function get ('ad-advice-info)] 3]))
(defalias 'ad-set-advice-info '(macro . #[#'advice-info "\302\303	F\207" [function advice-info put 'ad-advice-info] 4]))
(defalias 'ad-copy-advice-info '(macro . #[(function) "\301\302\303BBD\207" [function copy-tree get ('ad-advice-info)] 4]))
#@119 Return non-nil if FUNCTION has any advice info associated with it.
This does not mean that the advice is also active.
(defalias 'ad-is-advised '(macro . #[(function) "\301D\207" [function ad-get-advice-info-macro] 2 (#$ . 5313)]))
#@90 Initialize the advice info for FUNCTION.
Assumes that FUNCTION has not yet been advised.
(defalias 'ad-initialize-advice-info #[(function) "\302\303!	\"\204\303!C	B\304\305\306\307BC#\207" [function ad-advised-functions assoc symbol-name put ad-advice-info active nil] 5 (#$ . 5551)])
#@58 Retrieve the value of the advice info FIELD of FUNCTION.
(defalias 'ad-get-advice-info-field '(macro . #[#'field "\302\303\304	DED\207" [field function cdr assq ad-get-advice-info-macro] 5 (#$ . 5848)]))
#@66 Destructively modify VALUE of the advice info FIELD of FUNCTION.
(defalias 'ad-set-advice-info-field #[(function field value) "\303N\205	\303N\236\203	\303N\236\n\241\207\303N	\nBC\244\207" [function field value ad-advice-info] 3 (#$ . 6059)])
#@54 Return non-nil if FUNCTION is advised and activated.
(defalias 'ad-is-active #[(function) "\301\302N\236A\207" [function active ad-advice-info] 3 (#$ . 6317)])
#@263 Constructs single piece of advice to be stored in some advice-info.
NAME should be a non-nil symbol, PROTECT and ENABLE should each be
either t or nil, and DEFINITION should be a list of the form
`(advice lambda ARGLIST [DOCSTRING] [INTERACTIVE-FORM] BODY...)'.
(defalias 'ad-make-advice #[(name protect enable definition) "	\nF\207" [name protect enable definition] 4 (#$ . 6485)])
(defalias 'ad-advice-name '(macro . #[(advice) "\301D\207" [advice car] 2]))
(defalias 'ad-advice-protected '(macro . #[(advice) "\301\302E\207" [advice nth 1] 3]))
(defalias 'ad-advice-enabled '(macro . #[(advice) "\301\302E\207" [advice nth 2] 3]))
(defalias 'ad-advice-definition '(macro . #[(advice) "\301\302E\207" [advice nth 3] 3]))
(defalias 'ad-advice-set-enabled #[(advice flag) "AA	\240\207" [advice flag] 2])
(defalias 'ad-class-p #[(thing) "	>\207" [thing ad-advice-classes] 2])
(defalias 'ad-name-p #[(thing) "\2059\207" [thing] 1])
(defalias 'ad-position-p #[(thing) "\301!\206	\302>\207" [thing natnump (first last)] 2])
(defvar ad-advice-classes '(before around after activation deactivation))
#@65 True if at least one of FUNCTION's advices in CLASS is enabled.
(defalias 'ad-has-enabled-advice #[#'class "\300\301\215\207" [--cl-block-nil-- (byte-code "	\304N\236A\305\211\205#@\306\n8\203\307\310\311\"\210A\211\204
\305*\207" [class function advice --dolist-tail-- ad-advice-info nil 2 throw --cl-block-nil-- t] 4)] 2 (#$ . 7600)])
#@139 True if FUNCTION's advice info defines at least 1 redefining advice.
Redefining advices affect the construction of an advised definition.
(defalias 'ad-has-redefining-advice #[(function) "\301N\205\302\303\"\206\302\304\"\206\302\305\"\207" [function ad-advice-info ad-has-enabled-advice before around after] 3 (#$ . 7955)])
#@66 True if the advice info of FUNCTION defines at least one advice.
(defalias 'ad-has-any-advice #[(function) "\301N\205	\302\303\215\207" [function ad-advice-info --cl-block-nil-- (byte-code "\304\211\203 \n@\211\305N\236A\203\306\307\310\"\210\nA\211\204\304*\304\207" [ad-advice-classes class --dolist-tail-- function nil ad-advice-info throw --cl-block-nil-- t] 4)] 2 (#$ . 8296)])
#@58 Return the list of enabled advices of FUNCTION in CLASS.
(defalias 'ad-get-enabled-advices #[#'class "\305	\n\306N\236A\305\211\203#\f@\3078\203B\fA\211\204*\310!)\207" [enabled-advices class function advice --dolist-tail-- nil ad-advice-info 2 reverse] 4 (#$ . 8699)])
#@72 Automatic advice activation is disabled. `ad-start-advice' enables it.
(defalias 'ad-activate-internal #[(function &optional compile) "\300\207" [nil] 1 (#$ . 8990)])
#@72 Automatic advice activation is disabled. `ad-start-advice' enables it.
(defalias 'ad-activate-internal-off #[(function &optional compile) "\300\207" [nil] 1 (#$ . 9163)])
(defvar ad-activate-on-top-level t)
(defalias 'ad-with-auto-activation-disabled '(macro . #[(&rest body) "\301\302BB\207" [body let ((ad-activate-on-top-level nil))] 3]))
#@73 A safe `fset' which will never call `ad-activate-internal' recursively.
(defalias 'ad-safe-fset #[(symbol definition) "\303	\nM)\207" [ad-activate-on-top-level symbol definition nil] 2 (#$ . 9512)])
#@53 Make name to be used to call the original FUNCTION.
(defalias 'ad-make-origname #[(function) "\301\302\303\"!\207" [function intern format "ad-Orig-%s"] 4 (#$ . 9718)])
(defalias 'ad-get-orig-definition '(macro . #[(function) "\301\302\303\304BBDC\305BB\207" [function let origname ad-get-advice-info-field ('origname) ((if (fboundp origname) (symbol-function origname)))] 5]))
(defalias 'ad-set-orig-definition '(macro . #[#'definition "\302\303\304BB	E\207" [function definition ad-safe-fset ad-get-advice-info-field ('origname)] 4]))
(defalias 'ad-clear-orig-definition '(macro . #[(function) "\301\302\303BBD\207" [function fmakunbound ad-get-advice-info-field ('origname)] 4]))
#@336 Read name of advised function with completion from the minibuffer.
An optional PROMPT will be used to prompt for the function.  PREDICATE
plays the same role as for `try-completion' (which see).  DEFAULT will
be returned on empty input (defaults to the first advised function or
function at point for which PREDICATE returns non-nil).
(defalias 'ad-read-advised-function #[(&optional prompt predicate default) "\204\306\307!\210	\2069\310\311!\210\312 \211\205+\313\314\n!\"\205+\203*\n!\205+\n)\2069\315\316\215\2069\306\317\320\"\321\322\323
\206D\324	#\205L\325\326$\211\327\232\203f	\330N\203_	\202i\306\331	\"\202i\332\n!*\207" [ad-advised-functions default function predicate ad-pReDiCaTe prompt error "ad-read-advised-function: There are no advised functions" require help function-called-at-point assoc symbol-name --cl-block-nil-- (byte-code "\304\211\203&\n@\305	@!\203	!\203\306\307	\"\210\nA\211\204\304*\304\207" [ad-advised-functions function --dolist-tail-- predicate nil intern throw --cl-block-nil--] 4) "ad-read-advised-function: %s" "There are no qualifying advised functions" completing-read format "%s (default %s): " "Function" #[(function) "\302	@!!\207" [ad-pReDiCaTe function intern] 3] t "" ad-advice-info "ad-read-advised-function: `%s' is not advised" intern] 6 (#$ . 10412)])
(defvar ad-advice-class-completion-table (mapcar #[(class) "\301!C\207" [class symbol-name] 2] ad-advice-classes))
#@222 Read a valid advice class with completion from the minibuffer.
An optional PROMPT will be used to prompt for the class.  DEFAULT will
be returned on empty input (defaults to the first non-empty advice
class of FUNCTION).
(defalias 'ad-read-advice-class #[(function &optional prompt default) "\206\305\306\215\206\307\310	\"\311\312\313\n\206\314#\315\316$\211\317\232\203(\202+\320\f!)\207" [default function prompt ad-advice-class-completion-table class --cl-block-nil-- (byte-code "\304\211\205!\n@\211\305N\236A\203\306\307	\"\210\nA\211\204\304*\207" [ad-advice-classes class --dolist-tail-- function nil ad-advice-info throw --cl-block-nil--] 4) error "ad-read-advice-class: `%s' has no advices" completing-read format "%s (default %s): " "Class" nil t "" intern] 6 (#$ . 11883)])
#@120 Read name of existing advice of CLASS for FUNCTION with completion.
An optional PROMPT is used to prompt for the name.
(defalias 'ad-read-advice-name #[(function class &optional prompt) "\306\307	\310N\236A\"\211\204\311\312	#\202\n@@\313\314\f\206!\315#\316\f\n\317\320$\211\321\232\2037\322!\202:\322
!,\207" [class function name-completion-table default prompt name mapcar #[(advice) "\301@!C\207" [advice symbol-name] 2] ad-advice-info error "ad-read-advice-name: `%s' has no %s advice" format "%s (default %s): " "Name" completing-read nil t "" intern] 6 (#$ . 12701)])
#@173 Read a complete function/class/name specification from minibuffer.
The list of read symbols will be returned.  The optional PROMPT will
be used to prompt for the function.
(defalias 'ad-read-advice-specification #[(&optional prompt) "\304!\305	!\306	\n\"	\nE+\207" [prompt function class name ad-read-advised-function ad-read-advice-class ad-read-advice-name] 3 (#$ . 13299)])
(defvar ad-last-regexp "")
#@48 Read a regular expression from the minibuffer.
(defalias 'ad-read-regexp #[(&optional prompt) "\303\206\304	\305\232\203\306\202\307\310	\"P!\211\305\232\203!	\202\"\n\211)\207" [prompt ad-last-regexp regexp read-from-minibuffer "Regular expression" "" ": " format " (default %s): "] 6 (#$ . 13714)])
#@55 Find the first advice of FUNCTION in CLASS with NAME.
(defalias 'ad-find-advice '(macro . #[(function class name) "\303\304	\nEE\207" [name function class assq ad-get-advice-info-field] 5 (#$ . 14032)]))
#@65 Return position of first advice of FUNCTION in CLASS with NAME.
(defalias 'ad-advice-position #[(function class name) "	\n\305N\236A\236	\n\305N\236A\205\fG\f>GZ*\207" [name class function found-advice advices ad-advice-info] 4 (#$ . 14243)])
#@200 Find the first of FUNCTION's advices in CLASS matching NAME.
NAME can be a symbol or a regular expression matching part of an advice name.
If CLASS is `any' all valid advice classes will be checked.
(defalias 'ad-find-some-advice #[(function class name) "\302N\205\f\303\304\305\215)\207" [function found-advice ad-advice-info nil --cl-block-nil-- (byte-code "\305\211\205,\n@\306=\204	=\203\307\310\215\f\203$\311\307\f\"\210\nA\211\204\305*\207" [ad-advice-classes advice-class --dolist-tail-- class found-advice nil any --cl-block-nil-- (byte-code "	\305N\236A\306\211\2053@\f;\203\307\f\310\n@!\"\204&\f\n@=\203+\311\312\n\"\210A\211\204
\306*\207" [advice-class function advice --dolist-tail-- name ad-advice-info nil string-match symbol-name throw --cl-block-nil--] 5) throw] 4)] 2 (#$ . 14500)])
#@379 Set enable FLAG of FUNCTION's advices in CLASS matching NAME.
If NAME is a string rather than a symbol then it's interpreted as a regular
expression and all advices whose name contain a match for it will be
affected.  If CLASS is `any' advices in all valid advice classes will be
considered.  The number of changed advices will be returned (or nil if
FUNCTION was not advised).
(defalias 'ad-enable-advice-internal #[(function class name flag) "\306N\205h\307\n\310\211\203e\f@
\311=\204
=\203^\306N\236A\310
\211\203]\f@
;\203C\312\313
@!\"\204L
@=\203V	T\314
\"\210\fA\211\204-*\fA\211\204*	)\207" [function matched-advices ad-advice-classes advice-class --dolist-tail-- class ad-advice-info 0 nil any string-match symbol-name ad-advice-set-enabled advice name flag] 5 (#$ . 15342)])
#@53 Enables the advice of FUNCTION with CLASS and NAME.
(defalias 'ad-enable-advice #[(function class name) "\303N\203\304	\n\305$\306=\205\307\310	\n$\207\307\311\"\207" [function class name ad-advice-info ad-enable-advice-internal t 0 error "ad-enable-advice: `%s' has no %s advice matching `%s'" "ad-enable-advice: `%s' is not advised"] 5 (#$ . 16171) (ad-read-advice-specification "Enable advice of")])
#@53 Disable the advice of FUNCTION with CLASS and NAME.
(defalias 'ad-disable-advice #[(function class name) "\303N\203\304	\n\305$\306=\205\307\310	\n$\207\307\311\"\207" [function class name ad-advice-info ad-enable-advice-internal nil 0 error "ad-disable-advice: `%s' has no %s advice matching `%s'" "ad-disable-advice: `%s' is not advised"] 5 (#$ . 16588) (ad-read-advice-specification "Disable advice of")])
#@184 Set enable FLAGs of all CLASS advices whose name contains a REGEXP match.
If CLASS is `any' all valid advice classes are considered.  The number of
affected advices will be returned.
(defalias 'ad-enable-regexp-internal #[(regexp class flag) "\306	\307\211\203'@\310\n@!\311\n\f
\n$\206\306\\A\211\204\n\307*)\207" [matched-advices ad-advised-functions advised-function --dolist-tail-- class regexp 0 nil intern ad-enable-advice-internal flag] 7 (#$ . 17012)])
#@117 Enables all advices with names that contain a match for REGEXP.
All currently advised functions will be considered.
(defalias 'ad-enable-regexp #[(regexp) "\302\303\304#\305\306!\203\307\310	\"\210	)\207" [regexp matched-advices ad-enable-regexp-internal any t called-interactively-p interactive message "%d matching advices enabled"] 4 (#$ . 17497) (list (ad-read-regexp "Enable advices via regexp"))])
#@117 Disable all advices with names that contain a match for REGEXP.
All currently advised functions will be considered.
(defalias 'ad-disable-regexp #[(regexp) "\302\303\304#\305\306!\203\307\310	\"\210	)\207" [regexp matched-advices ad-enable-regexp-internal any nil called-interactively-p interactive message "%d matching advices disabled"] 4 (#$ . 17912) (list (ad-read-regexp "Disable advices via regexp"))])
#@150 Remove FUNCTION's advice with NAME from its advices in CLASS.
If such an advice was found it will be removed from the list of advices
in that CLASS.
(defalias 'ad-remove-advice #[(function class name) "\304N\203+	\n\304N\236A\236\211\203#\305\n\306\n\304N\236A\"#\202)\307\310\n	$)\207\307\311\"\207" [function name class advice-to-remove ad-advice-info ad-set-advice-info-field delq error "ad-remove-advice: `%s' has no %s advice `%s'" "ad-remove-advice: `%s' is not advised"] 9 (#$ . 18332) (ad-read-advice-specification "Remove advice of")])
#@1047 Add a piece of ADVICE to FUNCTION's list of advices in CLASS.

ADVICE has the form (NAME PROTECTED ENABLED DEFINITION), where
NAME is the advice name; PROTECTED is a flag specifying whether
to protect against non-local exits; ENABLED is a flag specifying
whether to initially enable the advice; and DEFINITION has the
form (advice . LAMBDA), where LAMBDA is a lambda expression.

If FUNCTION already has a piece of advice with the same name,
then POSITION is ignored, and the old advice is overwritten with
the new one.

If FUNCTION already has one or more pieces of advice of the
specified CLASS, then POSITION determines where the new piece
goes.  POSITION can either be `first', `last' or a number (where
0 corresponds to `first', and numbers outside the valid range are
mapped to the closest extremal position).

If FUNCTION was not advised already, its advice info will be
initialized.  Redefining a piece of advice whose name is part of
the cache-id will clear the cache.

See Info node `(elisp)Computed Advice' for detailed documentation.
(defalias 'ad-add-advice #[(function advice class position) "\306N\204\307!\210\310\311\312!#\210\313	\n@#	\306N\236A\206H
\314=\203.\315\202H
\316=\2039\fG\202H
\247\203G\315
\fG^]\202H\315\n@\317	\">\203W\320!\210\203c
\f\233\n\240\202}
\315U\203s\310	\n\fB#\202}
S\f\233\n
\f\233B\241+\207" [function class advice previous-position advices position ad-advice-info ad-initialize-advice-info ad-set-advice-info-field origname ad-make-origname ad-advice-position first 0 last ad-get-cache-class-id ad-clear-cache] 5 (#$ . 18896)])
#@63 Take a lambda function DEFINITION and make a macro out of it.
(defalias 'ad-macrofy '(macro . #[(definition) "\301\302E\207" [definition cons 'macro] 3 (#$ . 20507)]))
#@63 Take a macro function DEFINITION and make a lambda out of it.
(defalias 'ad-lambdafy '(macro . #[(definition) "\301D\207" [definition cdr] 2 (#$ . 20682)]))
#@54 Non-nil if and only if DEFINITION is a special form.
(defalias 'ad-special-form-p #[(definition) "9\203\301!\203\302!\303!\205\304!A\305=\207" [definition fboundp indirect-function subrp subr-arity unevalled] 2 (#$ . 20846)])
(defalias 'ad-subr-p '(macro . #[(definition) "\301D\207" [definition subrp] 2]))
(defalias 'ad-macro-p '(macro . #[(definition) "\301\302D\303BB\207" [definition eq car-safe ('macro)] 3]))
(defalias 'ad-lambda-p '(macro . #[(definition) "\301\302D\303BB\207" [definition eq car-safe ('lambda)] 3]))
(defalias 'ad-advice-p '(macro . #[(definition) "\301\302D\303BB\207" [definition eq car-safe ('advice)] 3]))
#@62 Return non-nil if DEFINITION is a compiled byte-code object.
(defalias 'ad-compiled-p '(macro . #[(definition) "\301\302D\303\304D\302\305DDEE\207" [definition or byte-code-function-p and ad-macro-p ad-lambdafy] 7 (#$ . 21504)]))
#@55 Return the byte-code object of a COMPILED-DEFINITION.
(defalias 'ad-compiled-code '(macro . #[(compiled-definition) "\301\302D\303DF\207" [compiled-definition if ad-macro-p ad-lambdafy] 4 (#$ . 21743)]))
#@69 Return the lambda expression of a function/macro/advice DEFINITION.
(defalias 'ad-lambda-expression #[(definition) "\242\301=\203	\207\242\302=\203A\207\242\303=\203A\207\304\207" [definition lambda macro advice nil] 2 (#$ . 21956)])
#@153 Return the argument list of DEFINITION.
If DEFINITION could be from a subr then its NAME should be
supplied to make subr arglist lookup more efficient.
(defalias 'ad-arglist #[(definition &optional name) "\301\302!\210\303\242\304=\204\242\305=\203A\202\306\"\207" [definition require help-fns help-function-arglist macro advice preserve-names] 3 (#$ . 22208)])
#@48 Return the unexpanded docstring of DEFINITION.
(defalias 'ad-docstring #[(definition) "\302!\204\242\303=\203\302A!\203\304\305\"\202!\306!AA@\211;\204-\307	!\205.	)\207" [definition docstring byte-code-function-p macro ad-real-documentation t ad-lambda-expression natnump] 4 (#$ . 22586)])
#@105 Return the interactive form of DEFINITION.
Like `interactive-form', but also works on pieces of advice.
(defalias 'ad-interactive-form #[(definition) "\301\242\302=\203\303!\202!\207" [definition interactive-form advice ad-lambda-expression] 3 (#$ . 22899)])
#@46 Return the list of body forms of DEFINITION.
(defalias 'ad-body-forms #[(definition) "\301!\204\242\302=\203\301A!\203\303\207:\2058\304!\203%\305\202&\306\307!\2030\305\2021\306\\\310!AA\233\207" [definition byte-code-function-p macro nil ad-docstring 1 0 ad-interactive-form ad-lambda-expression] 3 (#$ . 23171)])
#@318 Make an identifying docstring for the advised definition of FUNCTION.
Put function name into the documentation string so we can infer
the name of the advised function from the docstring.  This is needed
to generate a proper advised docstring even if we are just given a
definition (see the code for `documentation').
(defalias 'ad-make-advised-definition-docstring #[(function) "\301\302\303#\207" [function propertize "Advice doc string" ad-advice-info] 4 (#$ . 23512)])
#@69 Return non-nil if DEFINITION was generated from advice information.
(defalias 'ad-advised-definition-p #[(definition) "\242\302=\204\"\242\303=\204\"\304!\204\"\242\303=\2051\304A!\2051\305!\211;\2050\306\307\310	#)\207" [definition docstring lambda macro byte-code-function-p ad-docstring get-text-property 0 ad-advice-info] 5 (#$ . 23991)])
#@54 Return symbol that describes the type of DEFINITION.
(defalias 'ad-definition-type #[(definition) "\242\301=\203	\301\207\302!\203\303!\203\304\207\305\207\242\306=\2044\307!\2044\242\301=\2036\307A!\2036\310\207\242\311=\205>\311\207" [definition macro subrp ad-special-form-p special-form subr lambda byte-code-function-p function advice] 2 (#$ . 24353)])
#@117 True if FUNCTION is a symbol with a proper definition.
For that it has to be fbound with a non-autoload definition.
(defalias 'ad-has-proper-definition #[(function) "9\205\302!\205K\211\242)\303=?\207" [function object fboundp autoload] 3 (#$ . 24736)])
#@69 Find FUNCTION's definition at the end of function cell indirection.
(defalias 'ad-real-definition #[(function) "\302!\205K\2119\203\303	!\202	)\207" [function definition ad-has-proper-definition ad-real-definition] 3 (#$ . 25004)])
#@72 Find FUNCTION's real original definition starting from its `origname'.
(defalias 'ad-real-orig-definition #[(function) "\301N\205\302\303\301N\236A!\207" [function ad-advice-info ad-real-definition origname] 4 (#$ . 25251)])
#@70 True if FUNCTION has an interpreted definition that can be compiled.
(defalias 'ad-is-compilable #[(function) "\301!\205+K\242\302=\204K\242\303=\205+\304K!\206*K\242\303=\205*\304KA!?\207" [function ad-has-proper-definition lambda macro byte-code-function-p] 2 (#$ . 25486)])
#@62 Byte-compiles FUNCTION (or macro) if it is not yet compiled.
(defalias 'ad-compile-function #[(function) "\305!\2050\306\307\310!\210\307\311!\210\312\313!\n\314\315\316!\203\"\317\320!\210\fKM\210\321\f!\210\fKM,\207" [function ad-activate-on-top-level byte-compile-warnings warning-suppress-types symbol ad-is-compilable nil require bytecomp warnings make-symbol "advice-compilation" ((bytecomp)) featurep cl byte-compile-disable-warning cl-functions byte-compile] 3 (#$ . 25781) "aByte-compile function: "])
#@262 Parse ARGLIST into its required, optional and rest parameters.
A three-element list is returned, where the 1st element is the list of
required arguments, the 2nd is the list of optional arguments, and the 3rd
is the name of an optional rest parameter (or nil).
(defalias 'ad-parse-arglist #[(arglist) "\304\211\211\305>A@\211\203\306\305\306!>A!\307>A\211\203.\306\307\306!>A!\2020\n	E+\207" [rest optional required arglist nil &rest reverse &optional] 5 (#$ . 26308)])
#@418 Generate a form which evaluates into names/values/types of ARGLIST.
When the form gets evaluated within a function with that argument list
it will result in a list with one entry for each argument, where the
first element of each entry is the name of the argument, the second
element is its actual current value, and the third element is either
`required', `optional' or `rest' depending on the type of the argument.
(defalias 'ad-retrieve-args-form #[(arglist) "\303!\304	8\305\306\307\310	@\"\307\311	A@\"\n\205#\305\312\nD\n\313BBBC#*B\207" [arglist parsed-arglist rest ad-parse-arglist 2 list append mapcar #[(req) "\301\302D\303BBB\207" [req list quote ('required)] 4] #[(opt) "\301\302D\303BBB\207" [opt list quote ('optional)] 4] quote ('rest)] 8 (#$ . 26803)])
(defalias 'ad-arg-binding-field #[(binding field) "\302=\203		@\207\303=\203	A@\207\304=\205	AA@\207" [field binding name value type] 2])
(defalias 'ad-list-access #[(position list) "\302U\203	\207\303U\203\304	D\207\305	E\207" [position list 0 1 cdr nthcdr] 3])
(defalias 'ad-element-access #[(position list) "\302U\203\n\303	D\207\304U\203\303\305	DD\207\306	E\207" [position list 0 car 1 cdr nth] 3])
#@197 Tell how to access ARGLIST's actual argument at position INDEX.
For a required/optional arg it simply returns it, if a rest argument has
to be accessed, it returns a list with the index and name.
(defalias 'ad-access-argument #[(arglist index) "\305!\306	@	A@\"\307	8\f\nGW\203\f\n8\202'\205'\f\nGZD+\207" [arglist parsed-arglist reqopt-args rest-arg index ad-parse-arglist append 2] 3 (#$ . 28012)])
#@92 Return form to access ARGLIST's actual argument at position INDEX.
INDEX counts from zero.
(defalias 'ad-get-argument #[(arglist index) "\303	\"\211:\203\304\n@\nA@\"\202\n)\207" [arglist index argument-access ad-access-argument ad-element-access] 4 (#$ . 28429)])
#@89 Return form to set ARGLIST's actual arg at INDEX to VALUE-FORM.
INDEX counts from zero.
(defalias 'ad-set-argument #[(arglist index value-form) "\304	\"\211:\203\305\306\n@\nA@\"E\202'\n\203\"\307\nE\202'\310\311	#)\207" [arglist index argument-access value-form ad-access-argument setcar ad-list-access setq error "ad-set-argument: No argument at position %d of `%s'"] 5 (#$ . 28706)])
#@72 Return form to access all actual arguments starting at position INDEX.
(defalias 'ad-get-arguments #[(arglist index) "\306!\307	@	A@\"\310	8\311
\nGW\203\312
\n\233B\2037\f\203/\313\fE\2027\314
\nGZ\"\f,\207" [arglist parsed-arglist reqopt-args rest-arg args-form index ad-parse-arglist append 2 nil list nconc ad-list-access] 3 (#$ . 29109)])
#@110 Make form to assign elements of VALUES-FORM as actual ARGLIST args.
The assignment starts at position INDEX.
(defalias 'ad-set-arguments #[(arglist index values-form) "\306\307\211\310\f\"\211\203Q	9\203\"\311\f\312\n\313\"#B\202H	@\306U\2035\314	A@\315\n\313\"E\202C\316\315	@S	A@\"\315\n\313\"EB\307\fT\nT\202\204]\317\320\f#\202{G\321U\203m\322\323\324@#\202{\325\313
DC\326\327!\313C\"BB+\207" [set-forms argument-access values-index arglist index values-form 0 nil ad-access-argument ad-set-argument ad-element-access ad-vAlUeS setq ad-list-access setcdr error "ad-set-arguments: No argument at position %d of `%s'" 1 ad-substitute-tree #[(form) "\301=\207" [form ad-vAlUeS] 2] #[(form) "\207" [values-form] 1] let append reverse] 6 (#$ . 29476)])
#@68 Expands arg-access text macros in DEFINITION according to ARGLIST.
(defalias 'ad-insert-argument-access-forms #[(definition arglist) "\301\302\303#\207" [definition ad-substitute-tree #[(form) "\301=\206\242\302>\205A\242\250\207" [form ad-arg-bindings (ad-get-arg ad-get-args ad-set-arg ad-set-args)] 2] #[(form) "\305=\203\n\306	!\207@A@\307A	\"A@\211\310=\203&\311	\"\202L\f\312=\2034\313	\n#\202L\f\314=\203A\315	\"\202L\f\316=\205L\317	\n#+\207" [form arglist val index accessor ad-arg-bindings ad-retrieve-args-form ad-insert-argument-access-forms ad-get-arg ad-get-argument ad-set-arg ad-set-argument ad-get-args ad-get-arguments ad-set-args ad-set-arguments] 6]] 4 (#$ . 30266)])
#@591 Make `funcall/apply' form to map SOURCE-ARGLIST to TARGET-ARGLIST.
The arguments supplied to TARGET-ARGLIST will be taken from SOURCE-ARGLIST just
as if they had been supplied to a function with TARGET-ARGLIST directly.
Excess source arguments will be neglected, missing source arguments will be
supplied as nil.  Returns a `funcall' or `apply' form with the second element
being `function' which has to be replaced by an actual function argument.
Example: `(ad-map-arglists '(a &rest args) '(w x y z))' will return
         `(funcall function a (car args) (car (cdr args)) (nth 2 args))'.
(defalias 'ad-map-arglists #[(source-arglist target-arglist) "\306!\307	@	A@\"\310	8\306\f!\307
@
A@\"\310
8\205(\311\307\2037\312\2028\313\314D\203G\307\nC\"\202X\315\316\307\205VG\n\233\"\"\".\207" [source-arglist parsed-source-arglist source-reqopt-args source-rest-arg target-arglist parsed-target-arglist ad-parse-arglist append 2 -1 apply funcall function mapcar #[(arg) "T\302	\"\207" [target-arg-index source-arglist ad-get-argument] 3] target-reqopt-args target-rest-arg need-apply target-arg-index] 8 (#$ . 30988)])
#@66 Make form to call TARGET-FUNCTION with args from SOURCE-ARGLIST.
(defalias 'ad-make-mapped-call #[(source-arglist target-arglist target-function) "\304	\"\211@\305=\203\nAAB\202\n\211A\306D\240\210)\207" [source-arglist target-arglist mapped-form target-function ad-map-arglists funcall quote] 5 (#$ . 32147)])
(defalias 'ad-make-single-advice-docstring #[(advice class &optional style) "\304\3058!\n\306=\203	\202I\n\307=\203-\310\311@	\203#\312\202$\313	\206)\313%\202I	\203?\310\314\315\316!!@	$\202I\310\317\315\316!!@#)\207" [advice advice-docstring style class ad-docstring 3 plain freeze format "Permanent %s-advice `%s':%s%s" "\n" "" "%s-advice `%s':\n%s" capitalize symbol-name "%s-advice `%s'."] 6])
(require 'help-fns)
#@433 Construct a documentation string for the advised FUNCTION.
It concatenates the original documentation with the documentation
strings of the individual pieces of advice which will be formatted
according to STYLE.  STYLE can be `plain' or `freeze', everything else
will be interpreted as `default'.  The order of the advice documentation
strings corresponds to before/around/after and the individual ordering
in any of these classes.
(defalias 'ad-make-advised-docstring #[(function &optional style) "\306!\307\310	!!\311	\312\"\313\"\314\211\314\f\204$\312\202)\fA\f@\2031C\315=\204?\316\n\317Q
B\314\211\203\210@\320\"\314\211\203~@\321#\211\203u
BA\211\204]*A\211\204J*
\205\227\322\323\324
\237\325#\326#\327\f\".\207" [function origdef origtype origdoc usage paragraphs ad-real-orig-definition symbol-name ad-definition-type ad-real-documentation t help-split-fundoc nil plain "This " " is advised." ad-get-enabled-advices ad-make-single-advice-docstring propertize mapconcat identity "\n\n" ad-advice-info help-add-fundoc-usage advice-docstring ad-usage style ad-advice-classes class --dolist-tail-- advice] 6 (#$ . 32910)])
(defalias 'ad-make-plain-docstring #[(function) "\301\302\"\207" [function ad-make-advised-docstring plain] 3])
(defalias 'ad-make-freeze-docstring #[(function) "\301\302\"\207" [function ad-make-advised-docstring freeze] 3])
#@62 Find first defined arglist in FUNCTION's redefining advices.
(defalias 'ad-advised-arglist #[(function) "\300\301\215\207" [--cl-block-nil-- (byte-code "\304\305\306\"\305\307\"\305\310\"#\311\211\2050\n@\312\313	8!\211\203'\314\315\"\210)\nA\211\204\311*\207" [function advice --dolist-tail-- arglist append ad-get-enabled-advices before around after nil ad-arglist 3 throw --cl-block-nil--] 7)] 2 (#$ . 34347)])
#@63 Find first interactive form in FUNCTION's redefining advices.
(defalias 'ad-advised-interactive-form #[(function) "\300\301\215\207" [--cl-block-nil-- (byte-code "\304\305\306\"\305\307\"\305\310\"#\311\211\2050\n@\312\313	8!\211\203'\314\315\"\210)\nA\211\204\311*\207" [function advice --dolist-tail-- interactive-form append ad-get-enabled-advices before around after nil ad-interactive-form 3 throw --cl-block-nil--] 7)] 2 (#$ . 34780)])
#@66 Generate an advised definition of FUNCTION from its advice info.
(defalias 'ad-make-advised-definition #[(function) "\306N\205\344\307!\205\344\310!\302\306N\236A\311	!\312	!\313	!	\242\314=%\315	\"&\316!\2067&'\317!(%\203G\320\202h(\206h\321	!\205h\3219\203f\322N\203f\322N\323H\202g	!
\204s%\203\213%\203|\324\202}\325\326\327\nD\330'\331\"ED\202\266\f\203\257\203\257\204\257(\204\257\332\333\334\327\nDD\335'&\n#F\202\266\335'&\n#)\336%\203\302\314\202\313
\203\312\337\202\313\300'\340!)\341\342\"\341\343\"\341\344\"&.\207" [function origdef origname orig-interactive-p orig-subr-p orig-special-form-p ad-advice-info ad-has-redefining-advice ad-real-orig-definition commandp subrp ad-special-form-p macro ad-arglist ad-advised-arglist ad-advised-interactive-form nil interactive-form elp-info 2 macroexpand eval cons quote ad-get-arguments 0 if (called-interactively-p 'any) call-interactively ad-make-mapped-call ad-assemble-advised-definition special-form ad-make-advised-definition-docstring ad-get-enabled-advices before around after orig-macro-p orig-arglist advised-arglist advised-interactive-form orig-form] 11 (#$ . 35241)])
#@569 Assembles an original and its advices into an advised function.
It constructs a function or macro definition according to TYPE which has to
be either `macro', `function' or `special-form'.  ARGS is the argument list
that has to be used, DOCSTRING if non-nil defines the documentation of the
definition, INTERACTIVE if non-nil is the interactive form to be used,
ORIG is a form that calls the body of the original unadvised function,
and BEFORES, AROUNDS and AFTERS are the lists of advices with which ORIG
should be modified.  The assembled function will be returned.
(defalias 'ad-assemble-advised-definition #[(type args docstring interactive orig &optional befores arounds afters) "\306\307\310DE\311\211\211\211\311\211\203M@\211A@\203:\f\203:\312\313\f!\314\3158!BBC\202D\316\f\314\3158!\"A\211\204*\317!\311\211\203~@\211A@\203h\320\321\322\323\313\314\3158!!#A\211\204[*\203\221\f\203\221\312\313\f!
EC\202\226\316\f
C\" \311\211\203\325@\211A@\203\302\n\203\302\312\313\n!\314\3158!BBC\202\314\316\n\314\3158!\"A\211\204\242*\316!\324>\205\337\325\326\"D#\205\353#C$\205\363$C\327\330\316\n!\331=\203\332\202\307C\"BBC%\333	\"\"-\207" [orig definition after-forms around-form-protected before-forms around-form setq ad-return-value with-no-warnings nil unwind-protect macroexp-progn ad-body-forms 3 append reverse t ad-substitute-tree #[(form) "\301=\207" [form ad-do-it] 2] #[(form) "\207" [around-form] 1] (macro special-form) (macro) lambda let (ad-return-value) special-form (list 'quote ad-return-value) ad-insert-argument-access-forms befores advice --dolist-tail-- arounds afters type args docstring interactive] 12 (#$ . 36459)])
#@66 Make hook-form from FUNCTION's advice bodies in class HOOK-NAME.
(defalias 'ad-make-hook-form #[#'hook-name "\303\304\305	\"\"\211\205\306\307\310\n\"!)\207" [function hook-name hook-forms mapcar #[(advice) "\301\3028!\207" [advice ad-body-forms 3] 3] ad-get-enabled-advices macroexp-progn apply append] 6 (#$ . 38211)])
(defalias 'ad-get-cache-definition '(macro . #[(function) "\301\302\303BBD\207" [function car ad-get-advice-info-field ('cache)] 4]))
(defalias 'ad-get-cache-id '(macro . #[(function) "\301\302\303BBD\207" [function cdr ad-get-advice-info-field ('cache)] 4]))
(defalias 'ad-set-cache '(macro . #[(function definition id) "\303\304\305	\nEF\207" [function definition id ad-set-advice-info-field 'cache cons] 6]))
#@163 Clears a previously cached advised definition of FUNCTION.
Clear the cache if you want to force `ad-activate' to construct a new
advised definition from scratch.
(defalias 'ad-clear-cache #[(function) "\301\302\303#\207" [function ad-set-advice-info-field cache nil] 4 (#$ . 38959) (list (ad-read-advised-function "Clear cached definition of"))])
#@67 Generate an identifying image of the current advices of FUNCTION.
(defalias 'ad-make-cache-id #[(function) "\303!\304\305N\236A@\306\307\310\311\"\"\306\312\310\313\"\"\306\314\310\315\"\"\316\n!\317\n\"\317	!\232\2033\320\2027\317\n\"\316\n!\300=\205F\321\n!\321	!\232\257*\207" [function cached-definition original-definition ad-real-orig-definition cache ad-advice-info mapcar #[(advice) "@\207" [advice] 1] ad-get-enabled-advices before #[(advice) "@\207" [advice] 1] around #[(advice) "@\207" [advice] 1] after ad-definition-type ad-arglist t interactive-form] 8 (#$ . 39313)])
#@63 Return the part of FUNCTION's cache id that identifies CLASS.
(defalias 'ad-get-cache-class-id #[#'class "\303\304N\236AA\n\305=\203	@\202\"\n\306=\203	A@\202\"\307	8)\207" [function cache-id class cache ad-advice-info before around 2] 3 (#$ . 39918)])
(defalias 'ad-verify-cache-class-id #[(cache-class-id advices) "\300\301\215\207" [--cl-block-nil-- (byte-code "\304\211\203+\n@\305	8\203$@	@=\203A\202$\306\307\304\"\210\nA\211\204\304*?\207" [advices advice --dolist-tail-- cache-class-id nil 2 throw --cl-block-nil--] 4)] 2])
(defalias 'ad-cache-id-verification-code #[(function) "\305\306N\236AA\307\310\n@\311\306N\236A\"\203\223\312\211\203\223\310\nA@\313\306N\236A\"\203\223\314\211\203\223\310\315\n8\316\306N\236A\"\203\223\317\211\203\223\320!\305\306N\236A@\321\n8\322\f!=\203\222\323\211\203\222\324\n8\325=\203p\326\f\"\202s\324\n8\326!\232\203\222\327\211\203\222\330\n8\203\220\331\f!\331!\232\203\222\332*	*\207" [function code cache-id cached-definition original-definition cache ad-advice-info before-advice-mismatch ad-verify-cache-class-id before around-advice-mismatch around after-advice-mismatch 2 after definition-type-mismatch ad-real-orig-definition 3 ad-definition-type arglist-mismatch 4 t ad-arglist interactive-form-mismatch 5 interactive-form verified] 5])
#@69 True if FUNCTION's cache-id is compatible with its current advices.
(defalias 'ad-verify-cache-id #[(function) "\301!\302=\207" [function ad-cache-id-verification-code verified] 2 (#$ . 41274)])
#@57 Preactivate FUNCTION and returns the constructed cache.
(defalias 'ad-preactivate-advice #[(function advice class position) "\306!\211\205\nK\307\310N!\f\311\216\312
$\210\313
@#\210\314!\210\315\316\"\210\317!\205N\320\310N\236A@\205N\320\310N\236A@\320\310N\236AAD-\207" [function function-defined-p old-definition old-advice-info ad-advised-functions advice fboundp copy-tree ad-advice-info ((byte-code "\304\305	#\210\n\203\306\"\210\202\307!\210\304\207" [function old-advice-info function-defined-p old-definition put ad-advice-info ad-safe-fset fmakunbound] 4)) ad-add-advice ad-enable-advice ad-clear-cache ad-activate -1 ad-is-active cache class position] 6 (#$ . 41476)])
(defalias 'ad-make-freeze-definition #[(function advice class position) "\306!\204\307\310\"\210	@\311\312\313\314!\n$!\305\315N\236A\316
!\205(
K)\206.K$\315N\205;\317\315N!%\320K&\314K'\321\216\322\320\323\"\210\322\314\324\"\210\325\315\326#\210\327	($\210\322\305\315N\236A$\"\210\330!)\211)\205\266)\242\331=\211*\203\205)A\202\207)A+\332\333\334\316\335\fDDD\336\335\fD\337\340\335DD\341\335DDEEE*\203\256\342\202\257\343+BBE*.\207" [function advice name class unique-origname origname ad-has-proper-definition error "ad-make-freeze-definition: `%s' is not yet defined" intern format "%s-%s-%s" ad-make-origname ad-advice-info fboundp copy-tree ad-make-advised-definition-docstring ((byte-code "\304\305	#\210\306\307\n\"\210\306\310\"\207" [function old-advice-info real-docstring-fn real-origname-fn put ad-advice-info ad-safe-fset ad-make-advised-definition-docstring ad-make-origname] 4)) ad-safe-fset ad-make-freeze-docstring #[(x) "\207" [unique-origname] 1] put nil ad-add-advice ad-make-advised-definition macro progn if not quote fset or ad-get-orig-definition symbol-function defmacro defun orig-definition old-advice-info real-docstring-fn real-origname-fn position frozen-definition macro-p body] 11])
#@283 Return non-nil if the advised FUNCTION should be compiled.
If COMPILE is non-nil and not a negative number then it returns t.
If COMPILE is a negative number then it returns nil.
If COMPILE is nil then the result depends on the value of
`ad-default-compilation-action' (which see).
(defalias 'ad-should-compile #[#'compile "\250\203	\304Y\207\203\207	\305=\203\306\207	\307=\203\310\207	\311=\203y\312\303\n\313N\236A\314!\2055K)!\206|\315\303\n\313N\236A\314!\205JK)!\206|\303\n\313N\236A\314!\205^K)\242\316=\205|\315\303\n\313N\236A\314!\205uK)A!\207\317\320!\207" [compile ad-default-compilation-action function origname 0 never nil always t like-original subrp ad-advice-info fboundp byte-code-function-p macro featurep byte-compile] 4 (#$ . 43464)])
#@212 Redefine FUNCTION with its advised definition from cache or scratch.
The resulting FUNCTION will be compiled if `ad-should-compile' returns t.
The current definition and its cache-id will be put into the cache.
(defalias 'ad-activate-advised-definition #[#'compile "\303!\205
\304\305N\236A@\306	\206\307!\"\210\310\n\"\203$\311!\210	\203A	K=?\205X\312\304K\304\305N\236AAB#\202X\313!\210\312\304K\314B#\210\312\304K\315!B#)\207" [function verified-cached-definition compile ad-verify-cache-id cache ad-advice-info ad-safe-fset ad-make-advised-definition ad-should-compile ad-compile-function ad-set-advice-info-field ad-clear-cache nil ad-make-cache-id] 7 (#$ . 44258)])
#@707 Handle re/definition of an advised FUNCTION during de/activation.
If FUNCTION does not have an original definition associated with it and
the current definition is usable, then it will be stored as FUNCTION's
original definition.  If no current definition is available (even in the
case of undefinition) nothing will be done.  In the case of redefinition
the action taken depends on the value of `ad-redefinition-action' (which
see).  Redefinition occurs when FUNCTION already has an original definition
associated with it but got redefined with a new definition and then
de/activated.  If you do not like the current redefinition action change
the value of `ad-redefinition-action' and de/activate again.
(defalias 'ad-handle-definition #[(function) "\301\305N\236A\306	!\205	K)\307!\205K\211\203b\n\205o\n=?\205o\310\n!?\205o\f\311>\204>\312\313\314#\202o\f\315=\203K\316\"\202o\316\301\305N\236A\n\"\210\f\317=\205o\320\321\"\202o\n\205o\316\301\305N\236A\n\"*\207" [function origname current-definition original-definition ad-redefinition-action ad-advice-info fboundp ad-real-definition ad-advised-definition-p (accept discard warn) error "ad-handle-definition (see its doc): `%s' %s" "invalidly redefined" discard ad-safe-fset warn message "ad-handle-definition: `%s' got redefined"] 5 (#$ . 44961)])
#@1006 Activate all the advice information of an advised FUNCTION.
If FUNCTION has a proper original definition then an advised
definition will be generated from FUNCTION's advice info and the
definition of FUNCTION will be replaced with it.  If a previously
cached advised definition was available, it will be used.
The optional COMPILE argument determines whether the resulting function
or a compilable cached definition will be compiled.  If it is negative
no compilation will be performed, if it is positive or otherwise non-nil
the resulting function will be compiled, if it is nil the behavior depends
on the value of `ad-default-compilation-action' (which see).
Activation of an advised function that has an advice info but no actual
pieces of advice is equivalent to a call to `ad-unadvise'.  Activation of
an advised function that has actual pieces of advice but none of them are
enabled is equivalent to a call to `ad-deactivate'.  The current advised
definition will always be cached for later usage.
(defalias 'ad-activate #[(function &optional compile) "\205V\304	\305N\204\306\307	\"\202U\310	!\210\302	\305N\236A\311\n!\205&\nK)\205U\312	!\2046\313	!\202U\314	!\203R\315	\"\210\316	\317\320#\210\321\322	\323\"!\210	\202U\324	!)\207" [ad-activate-on-top-level function origname compile nil ad-advice-info error "ad-activate: `%s' is not advised" ad-handle-definition fboundp ad-has-any-advice ad-unadvise ad-has-redefining-advice ad-activate-advised-definition ad-set-advice-info-field active t eval ad-make-hook-form activation ad-deactivate] 4 (#$ . 46304) (list (ad-read-advised-function "Activate advice of") current-prefix-arg)])
(defalias 'ad-activate-on 'ad-activate)
#@279 Deactivate the advice of an actively advised FUNCTION.
If FUNCTION has a proper original definition, then the current
definition of FUNCTION will be replaced with it.  All the advice
information will still be available so it can be activated again with
a call to `ad-activate'.
(defalias 'ad-deactivate #[(function) "\302N\204\303\304\"\207\305!\205O\306!\210\301\302N\236A\307	!\205$	K)\204-\303\310\"\207\311\301\302N\236A\307	!\205>	K)\"\210\312\313\314#\210\315\316\317\"!\210\207" [function origname ad-advice-info error "ad-deactivate: `%s' is not advised" ad-is-active ad-handle-definition fboundp "ad-deactivate: `%s' has no original definition" ad-safe-fset ad-set-advice-info-field active nil eval ad-make-hook-form deactivation] 5 (#$ . 48008) (list (ad-read-advised-function "Deactivate advice of" 'ad-is-active))])
#@138 Update the advised definition of FUNCTION if its advice is active.
See `ad-activate' for documentation on the optional COMPILE argument.
(defalias 'ad-update #[(function &optional compile) "\302!\205\n\303	\"\207" [function compile ad-is-active ad-activate] 3 (#$ . 48862) (list (ad-read-advised-function "Update advised definition of" 'ad-is-active))])
#@114 Deactivate FUNCTION and then remove all its advice information.
If FUNCTION was not advised this will be a noop.
(defalias 'ad-unadvise #[(function) "\302N\205*\303!\203\304!\210\305\306\302N\236A!\210\307\302\310#\210\311\312\313!	\"	\"\211\207" [function ad-advised-functions ad-advice-info ad-is-active ad-deactivate fmakunbound origname put nil delq assoc symbol-name] 4 (#$ . 49226) (list (ad-read-advised-function "Unadvise function"))])
#@214 Try to recover FUNCTION's original definition, and unadvise it.
This is more low-level than `ad-unadvise' in that it does not do
deactivation, which might run hooks and get into other trouble.
Use in emergencies.
(defalias 'ad-recover #[(function) "\303N\205G\301\303N\236A\304	!\205	K)\2036\305\301\303N\236A\304	!\205*	K)\"\210\306\301\303N\236A!\210\307\303\310#\210\311\312\313!\n\"\n\"\211\207" [function origname ad-advised-functions ad-advice-info fboundp ad-safe-fset fmakunbound put nil delq assoc symbol-name] 5 (#$ . 49687) (list (intern (completing-read "Recover advised function: " obarray nil t)))])
#@259 Activate functions with an advice name containing a REGEXP match.
This activates the advice for each function
that has at least one piece of advice whose name includes a match for REGEXP.
See `ad-activate' for documentation on the optional COMPILE argument.
(defalias 'ad-activate-regexp #[(regexp &optional compile) "\305\211\203$\n@\306	@!\307	\310#\203\311	\f\"\210\nA\211\204\305*\305\207" [ad-advised-functions function --dolist-tail-- regexp compile nil intern ad-find-some-advice any ad-activate] 5 (#$ . 50323) (list (ad-read-regexp "Activate via advice regexp") current-prefix-arg)])
#@191 Deactivate functions with an advice name containing REGEXP match.
This deactivates the advice for each function
that has at least one piece of advice whose name includes a match for REGEXP.
(defalias 'ad-deactivate-regexp #[(regexp) "\304\211\203#\n@\305	@!\306	\307#\203\310	!\210\nA\211\204\304*\304\207" [ad-advised-functions function --dolist-tail-- regexp nil intern ad-find-some-advice any ad-deactivate] 5 (#$ . 50936) (list (ad-read-regexp "Deactivate via advice regexp"))])
#@259 Update functions with an advice name containing a REGEXP match.
This reactivates the advice for each function
that has at least one piece of advice whose name includes a match for REGEXP.
See `ad-activate' for documentation on the optional COMPILE argument.
(defalias 'ad-update-regexp #[(regexp &optional compile) "\305\211\203$\n@\306	@!\307	\310#\203\311	\f\"\210\nA\211\204\305*\305\207" [ad-advised-functions function --dolist-tail-- regexp compile nil intern ad-find-some-advice any ad-update] 5 (#$ . 51439) (list (ad-read-regexp "Update via advice regexp") current-prefix-arg)])
#@113 Activate all currently advised functions.
See `ad-activate' for documentation on the optional COMPILE argument.
(defalias 'ad-activate-all #[(&optional compile) "\304\211\203\n@\305	@!\306	\"\210\nA\211\204\304*\304\207" [ad-advised-functions function --dolist-tail-- compile nil intern ad-activate] 4 (#$ . 52046) "P"])
#@45 Deactivate all currently advised functions.
(defalias 'ad-deactivate-all #[nil "\303\211\203\n@\304	@!\305	!\210\nA\211\204\303*\303\207" [ad-advised-functions function --dolist-tail-- nil intern ad-deactivate] 3 (#$ . 52385) nil])
#@102 Update all currently advised functions.
With prefix argument, COMPILE resulting advised definitions.
(defalias 'ad-update-all #[(&optional compile) "\304\211\203\n@\305	@!\306	\"\210\nA\211\204\304*\304\207" [ad-advised-functions function --dolist-tail-- compile nil intern ad-update] 4 (#$ . 52635) "P"])
#@43 Unadvise all currently advised functions.
(defalias 'ad-unadvise-all #[nil "\303\211\203\n@\304	@!\305	!\210\nA\211\204\303*\303\207" [ad-advised-functions function --dolist-tail-- nil intern ad-unadvise] 3 (#$ . 52959) nil])
#@296 Recover all currently advised functions.  Use in emergencies.
To recover a function means to try to find its original (pre-advice)
definition, and delete all advice.
This is more low-level than `ad-unadvise' in that it does not do
deactivation, which might run hooks and get into other trouble.
(defalias 'ad-recover-all #[nil "\303\211\203\n@\304	@!\303\305\306\217\210\nA\211\204\303*\303\207" [ad-advised-functions function --dolist-tail-- nil intern (ad-recover function) ((error))] 4 (#$ . 53203) nil])
(defvar ad-defadvice-flags '(("protect") ("disable") ("activate") ("compile") ("preactivate") ("freeze")))
#@2584 Define a piece of advice for FUNCTION (a symbol).
The syntax of `defadvice' is as follows:

  (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
    [DOCSTRING] [INTERACTIVE-FORM]
    BODY...)

FUNCTION ::= Name of the function to be advised.
CLASS ::= `before' | `around' | `after' | `activation' | `deactivation'.
NAME ::= Non-nil symbol that names this piece of advice.
POSITION ::= `first' | `last' | NUMBER. Optional, defaults to `first',
    see also `ad-add-advice'.
ARGLIST ::= An optional argument list to be used for the advised function
    instead of the argument list of the original.  The first one found in
    before/around/after-advices will be used.
FLAG ::= `protect'|`disable'|`activate'|`compile'|`preactivate'|`freeze'.
    All flags can be specified with unambiguous initial substrings.
DOCSTRING ::= Optional documentation for this piece of advice.
INTERACTIVE-FORM ::= Optional interactive form to be used for the advised
    function.  The first one found in before/around/after-advices will be used.
BODY ::= Any s-expression.

Semantics of the various flags:
`protect': The piece of advice will be protected against non-local exits in
any code that precedes it.  If any around-advice of a function is protected
then automatically all around-advices will be protected (the complete onion).

`activate': All advice of FUNCTION will be activated immediately if
FUNCTION has been properly defined prior to this application of `defadvice'.

`compile': In conjunction with `activate' specifies that the resulting
advised function should be compiled.

`disable': The defined advice will be disabled, hence, it will not be used
during activation until somebody enables it.

`preactivate': Preactivates the advised FUNCTION at macro-expansion/compile
time.  This generates a compiled advised definition according to the current
advice state that will be used during activation if appropriate.  Only use
this if the `defadvice' gets actually compiled.

`freeze': Expands the `defadvice' into a redefining `defun/defmacro' according
to this particular single advice.  No other advice information will be saved.
Frozen advices cannot be undone, they behave like a hard redefinition of
the advised function.  `freeze' implies `activate' and `preactivate'.  The
documentation of the advised function can be dumped onto the `DOC' file
during preloading.

See Info node `(elisp)Advising Functions' for comprehensive documentation.
usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
          [DOCSTRING] [INTERACTIVE-FORM]
          BODY...)
(defalias 'defadvice '(macro . #[(function args &rest body) "\306!\204\307\310\"\210	@\311\n!\204\307\312\n\"\202	A@\306!\204,\307\313\"\202<	AA\314	@!\205<	@	A	@<\205H	@	A\315\316	\"#\317\320#>\321#>?\322\323
$BBB$\324#>\205s\325\n\f$%\326#>\203\206\327\n\f$\202\336\330\331\332D\332D\332\nD\332\fD\257\333%\205\302\334\332D%@\242\335=\203\265\336\300%@ADD\202\272\300%@D\332%A@DFC\337#>\205\327\340\332D\341#>\205\325\342EC\332DC#BB.\207" [function args class name position arglist ad-name-p error "defadvice: Invalid function name: %s" ad-class-p "defadvice: Invalid advice class: %s" "defadvice: Invalid advice name: %s" ad-position-p mapcar #[(flag) "\303\304!	\"\211\305=\203\202\"\306\n	\"\203\307\n!\202\"\310\311\")\207" [flag ad-defadvice-flags completion try-completion symbol-name t assoc intern error "defadvice: Invalid or ambiguous flag: %s"] 4] ad-make-advice protect disable advice lambda preactivate ad-preactivate-advice freeze ad-make-freeze-definition progn ad-add-advice quote append ad-set-cache macro ad-macrofy activate ad-activate compile t flags body preactivation] 8 (#$ . 53837)]))
(byte-code "\300\301\302\303#\210\300\301\304\305#\207" [put defadvice doc-string-elt 3 edebug-form-spec (&define name (name name &rest sexp) [&optional stringp] [&optional ("interactive" interactive)] def-body)] 4)
#@249 Binds FUNCTIONS to their original definitions and execute BODY.
For any members of FUNCTIONS that are not currently advised the rebinding will
be a noop.  Any modifications done to the definitions of FUNCTIONS will be
undone on exit of this macro.
(defalias 'ad-with-originals '(macro . #[(functions &rest body) "\304\305\306	\"\307\n\310\311\312\304\305\313	\"\"B\304\305\314	\"BBE*\207" [index functions current-bindings body -1 mapcar #[(function) "T\302\303\304\"!\305\306	DDD\207" [index function intern format "ad-oRiGdEf-%d" symbol-function quote] 4] let unwind-protect progn append #[(function) "T\303\304	D\305\306\304	DD\n8@EE\207" [index function current-bindings ad-safe-fset quote or ad-get-orig-definition] 6] #[(function) "T\303\304	D\n8@E\207" [index function current-bindings ad-safe-fset quote] 4]] 8 (#$ . 57824)]))
(put 'ad-with-originals 'lisp-indent-function 1)
#@44 Start the automatic advice handling magic.
(defalias 'ad-start-advice #[nil "\300\301\302\303#\210\304\301\305\"\207" [put ad-activate-internal ad-advice-info nil ad-safe-fset ad-activate] 4 (#$ . 58728) nil])
#@108 Stop the automatic advice handling magic.
You should only need this in case of Advice-related emergencies.
(defalias 'ad-stop-advice #[nil "\300\301\302\303#\210\304\301\305\"\207" [put ad-activate-internal ad-advice-info nil ad-safe-fset ad-activate-internal-off] 4 (#$ . 58945) nil])
#@95 Undo all advice related redefinitions and unadvises everything.
Use only in REAL emergencies.
(defalias 'ad-recover-normality #[nil "\301\302\303\304#\210\305\302\306\"\210\307 \210\304\211\207" [ad-advised-functions put ad-activate-internal ad-advice-info nil ad-safe-fset ad-activate-internal-off ad-recover-all] 4 (#$ . 59237) nil])
(byte-code "\300 \210\301\302!\207" [ad-start-advice provide advice] 2)

MMCT - 2023