;ELC ;;; compiled by jwz@thalidomide on Wed Mar 23 19:18:39 1994 ;;; from file /th/jwz/emacs19/lisp/utils/advice.el ;;; emacs version 19.10 Lucid (beta8). ;;; bytecomp version 2.22; 22-dec-93. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (byte-code "!\"" [provide advice-preload require "advice.el" "2.10" ad-version] 3) (defconst ad-lemacs-p (string-match "Lucid" emacs-version) "\ Non-nil if we run Lucid's version of Emacs-19.") (defvar ad-start-advice-on-load t "\ *Non-nil will start Advice magic when this file gets loaded. Also see function `ad-start-advice'.") (defvar ad-activate-on-definition nil "\ *Non-nil means automatic advice activation at function definition. Set this variable to t if you want to enable forward advice (which is automatic advice activation of a previously undefined function at the point the function gets defined/loaded/autoloaded). The value of this variable takes effect only during the execution of `ad-start-advice'. If non-nil it will enable definition hooks regardless of the value of `ad-enable-definition-hooks'.") (defvar ad-redefinition-action 'warn "\ *Defines what to do with redefinitions during de/activation. Redefinition occurs if a previously activated function that already has an original definition associated with it gets redefined and then de/activated. In such a case we can either accept the current definition as the new original definition, discard the current definition and replace it with the old original, or keep it and raise an error. The values `accept', `discard', `error' or `warn' govern what will be done. `warn' is just like `accept' but it additionally prints a warning message. All other values will be interpreted as `error'.") (defvar ad-definition-hooks nil "\ *List of hooks to be run after a function definition. The variable `ad-defined-function' will be bound to the name of the currently defined function when the hook function is run.") (defvar ad-enable-definition-hooks nil "\ *Non-nil will enable hooks to be run on function definition. Setting this variable is a noop unless the value of `ad-activate-on-definition' (which see) is nil.") (byte-code "MM" [ad-substitute-tree #[(sUbTrEe-TeSt fUnCtIoN tReE) ": @!\n@!@: \n@#@ \nA#B !\n!" [tReE sUbTrEe-TeSt fUnCtIoN ad-substitute-tree] 5] ad-copy-tree #[(tree) ":@!A!B" [tree ad-copy-tree] 3]] 2) (fset 'ad-dolist '(macro . #[(varform &rest body) "\nA@D\n@D\n@ECC$\nAA@F ˍ E )" [let ad-dO-vAr varform append (while ad-dO-vAr) setq (car ad-dO-vAr) body (setq ad-dO-vAr (cdr ad-dO-vAr)) expansion contains-return (byte-code " #ć" [ad-substitute-tree #[(subtree) "==\"" [subtree ad-dolist ad-do-return throw contains-return t] 3] identity body nil] 4) catch 'ad-dO-eXiT] 7 "\ A Common-Lisp-style dolist iterator with the following syntax: (ad-dolist (VAR INIT-FORM [RESULT-FORM]) BODY-FORM...) which will iterate over the list yielded by INIT-FORM binding VAR to the current head at every iteration. If RESULT-FORM is supplied its value will be returned at the end of the iteration, nil otherwise. The iteration can be exited prematurely with `(ad-do-return [VALUE])'."])) (byte-code "MN#MM ! MMMN#MMMMMMMM" [ad-do-return (macro . #[(value) "\nE" [throw 'ad-dO-eXiT value] 3]) ad-dolist lisp-indent-hook put 1 ad-save-real-definition (macro . #[(function) " \"!\" DDD D DDEC N D NDFC N D NDFC$E)" [intern format "ad-real-%s" function saved-function require byte-compile "bytecomp" if not fboundp quote append (progn) fset symbol-function put 'byte-compile byte-opcode 'byte-opcode] 12]) ad-save-real-definitions #[nil "!KM##!KM!KM##" [fboundp ad-real-fset fset put byte-compile byte-compile-fset byte-opcode byte-fset ad-real-documentation documentation ad-real-byte-code byte-code byte-compile-splice-in-already-compiled-code nil] 4] boundp ad-advised-functions nil ad-pushnew-advised-function (macro . #[(function) " DED DDEEE" [if not assoc symbol-name function ad-advised-functions setq cons list] 8]) ad-pop-advised-function (macro . #[(function) " DEEE" [setq ad-advised-functions delq assoc symbol-name function] 6]) ad-do-advised-functions (macro . #[(varform &rest body) "\n@\nA@E\n@\n@DDED#" [append (ad-dolist) varform ad-advised-functions setq intern car body] 8]) ad-get-advice-info (macro . #[(function) " E" [get function 'ad-advice-info] 3]) ad-set-advice-info (macro . #[(function advice-info) " F" [put function 'ad-advice-info advice-info] 4]) ad-copy-advice-info (macro . #[(function) "\nED" [ad-copy-tree get function 'ad-advice-info] 4]) ad-is-advised (macro . #[(function) " D" [ad-get-advice-info function] 2]) ad-initialize-advice-info #[(function) "\n! \"\n!C B\nBC#" [assoc symbol-name function ad-advised-functions put ad-advice-info active nil] 5] ad-get-advice-info-field (macro . #[(function field) "\n DED" [cdr assq field ad-get-advice-info function] 5]) ad-set-advice-info-field #[(function field value) "N\nN\nN N\n BC" [function ad-advice-info field value] 3] ad-is-active #[(function) " NA" [active function ad-advice-info] 3]] 4) (fset 'ad-make-advice #[(name protect enable definition) " \n F" [name protect enable definition] 4 "\ 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...)'."]) (byte-code "MMMMMMMM!MMMMMMMMM!\"%MMM!.MMM" [ad-advice-name (macro . #[(advice) " D" [car advice] 2]) ad-advice-protected (macro . #[(advice) "\nE" [nth 1 advice] 3]) ad-advice-enabled (macro . #[(advice) "\nE" [nth 2 advice] 3]) ad-advice-definition (macro . #[(advice) "\nE" [nth 3 advice] 3]) ad-advice-set-enabled #[(advice flag) "AA " [advice flag] 2] ad-class-p #[(thing) " >" [thing ad-advice-classes] 2] ad-name-p #[(thing) "9" [thing] 1] ad-position-p #[(thing) " ! >" [natnump thing (first last)] 2] boundp ad-advice-classes (before around after activation deactivation) ad-has-enabled-advice #[(function class) "" [ad-dO-eXiT (byte-code " NA @ 8\" Am*Ç" [class function ad-advice-info nil advice ad-dO-vAr 2 throw ad-dO-eXiT t] 4)] 2] ad-has-redefining-advice #[(function) "N\"\"\"" [function ad-advice-info ad-has-enabled-advice before around after] 3] ad-has-any-advice #[(function) "NÍ" [function ad-advice-info ad-dO-eXiT (byte-code " @ NA\" Aj*" [ad-advice-classes nil class ad-dO-vAr function ad-advice-info throw ad-dO-eXiT t] 4)] 2] ad-get-enabled-advices #[(function class) "\n NA@ 8 BAk* !)" [nil enabled-advices class function ad-advice-info advice ad-dO-vAr 2 reverse] 4] ad-make-origname #[(function) " \"!" [intern format "ad-Orig-%s" function] 4] ad-get-orig-definition (macro . #[(function) " EDCE" [let origname ad-get-advice-info-field function 'origname (if (fboundp origname) (symbol-function origname))] 5]) ad-set-orig-definition (macro . #[(function definition) "\nE" [ad-real-fset (ad-get-advice-info-field function 'origname) definition] 3]) ad-clear-orig-definition (macro . #[(function) "\nED" [fmakunbound ad-get-advice-info-field function 'origname] 4]) ad-read-advised-function #[(&optional prompt predicate default) "! ō\"  #$Қ N \"!*" [ad-advised-functions error "ad-read-advised-function: There are no advised functions" default ad-dO-eXiT (byte-code " @\n@! \n!\n\" Ae*" [ad-advised-functions nil function ad-dO-vAr intern predicate throw ad-dO-eXiT] 4) "ad-read-advised-function: %s" "There are no qualifying advised functions" predicate ad-pReDiCaTe completing-read format "%s(default %s) " prompt "Function: " #[(function) "\n@!!" [ad-pReDiCaTe intern function] 3] t function "" ad-advice-info "ad-read-advised-function: `%s' is not advised" intern] 6] ad-advice-class-completion-table mapcar #[(class) " !C" [symbol-name class] 2] ad-read-advice-class #[(function &optional prompt default) " \" # $Ϛ!)" [default ad-dO-eXiT (byte-code " @ NA\n\" Aj*" [ad-advice-classes nil class ad-dO-vAr function ad-advice-info throw ad-dO-eXiT] 4) error "ad-read-advice-class: `%s' has no advices" function completing-read format "%s(default %s) " prompt "Class: " ad-advice-class-completion-table nil t class "" intern] 6] ad-read-advice-name #[(function class &optional prompt) "\n NA\" \n# @@ #  $њ!!," [mapcar #[(advice) " @!C" [symbol-name advice] 2] class function ad-advice-info name-completion-table error "ad-read-advice-name: `%s' has no %s advice" default format "%s(default %s) " prompt "Name: " completing-read nil t name "" intern] 6] ad-read-advice-specification #[(&optional prompt) " !\n!\n \"\n E+" [ad-read-advised-function prompt function ad-read-advice-class class ad-read-advice-name name] 3] ad-last-regexp "" ad-read-regexp #[(&optional prompt) " ĚĪ \"P!Ě )" [read-from-minibuffer prompt "Regular expression: " ad-last-regexp "" format "(default \"%s\") " regexp] 6] ad-find-advice (macro . #[(function class name) " EE" [assq name ad-get-advice-info-field function class] 5]) ad-advice-position #[(function class name) " \nNA \nNA G >GZ*" [name class function ad-advice-info found-advice advices] 4]] 3) (fset 'ad-find-some-advice #[(function class name) "Nō)" [function ad-advice-info nil found-advice ad-dO-eXiT (byte-code " @ =\n =Ǎ\" A^*" [ad-advice-classes nil advice-class ad-dO-vAr class any ad-dO-eXiT (byte-code " NA @; @!\" @= \" A\\*Ç" [advice-class function ad-advice-info nil advice ad-dO-vAr name string-match symbol-name throw ad-dO-eXiT] 5) found-advice throw] 4)] 2 "\ Finds 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 legal advice classes will be checked."]) (fset 'ad-enable-advice-internal #[(function class name flag) "N @==NA\n@\n ; \n@!\" \n@= T\n\"AQ*A'* )" [function ad-advice-info 0 matched-advices ad-advice-classes nil advice-class ad-dO-vAr class any advice name string-match symbol-name ad-advice-set-enabled flag] 5]) (fset 'ad-enable-advice #[(function class name) "N $= $\"" [function ad-advice-info ad-enable-advice-internal class name t 0 error "ad-enable-advice: `%s' has no %s advice matching `%s'" "ad-enable-advice: `%s' is not advised"] 5 "\ Enables the advice of FUNCTION with CLASS and NAME." (ad-read-advice-specification "Enable advice of: ")]) (fset 'ad-disable-advice #[(function class name) "N $= $\"" [function ad-advice-info ad-enable-advice-internal class name nil 0 error "ad-disable-advice: `%s' has no %s advice matching `%s'" "ad-disable-advice: `%s' is not advised"] 5 "\ Disables the advice of FUNCTION with CLASS and NAME." (ad-read-advice-specification "Disable advice of: ")]) (fset 'ad-enable-regexp-internal #[(regexp class flag) "\n @ @!  \n$\\ Ac* )" [0 matched-advices ad-advised-functions nil advised-function ad-dO-vAr intern ad-enable-advice-internal class regexp flag] 7]) (fset 'ad-enable-regexp #[(regexp) " #t \" )" [ad-enable-regexp-internal regexp any t matched-advices message "%d matching advices enabled"] 4 "\ Enables all advices with names that contain a match for REGEXP. All currently advised functions will be considered." (byte-code "!C" [ad-read-regexp "Enable advices via regexp: "] 2)]) (fset 'ad-disable-regexp #[(regexp) " #t \" )" [ad-enable-regexp-internal regexp any nil matched-advices message "%d matching advices disabled"] 4 "\ Disables all advices with names that contain a match for REGEXP. All currently advised functions will be considered." (byte-code "!C" [ad-read-regexp "Disable advices via regexp: "] 2)]) (fset 'ad-remove-advice #[(function class name) "N\n NA NA\"# \n$)\"" [function ad-advice-info name class advice-to-remove ad-set-advice-info-field delq error "ad-remove-advice: `%s' has no %s advice `%s'" "ad-remove-advice: `%s' is not advised"] 9 "\ Removes 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." (ad-read-advice-specification "Remove advice of: ")]) (fset 'ad-add-advice #[(function advice class position) "N!!#@# NA\n  =ͪ =\nG  \nG^] @\">!  \n U\nB# S\n \nB+" [function ad-advice-info ad-initialize-advice-info ad-set-advice-info-field origname ad-make-origname ad-advice-position class advice previous-position advices position first 0 last ad-get-cache-class-id ad-clear-cache] 5 "\ Adds a piece of ADVICE to FUNCTION's list of advices in CLASS. If FUNCTION already has one or more pieces of advice of the specified CLASS then POSITION determines where the new piece will go. The value of POSITION can either be `first', `last' or a number where 0 corresponds to `first'. Numbers outside the range will be mapped to the closest extreme position. If there was already a piece of ADVICE with the same name, then the position argument will be ignored and the old advice will be overwritten with the new one. If the FUNCTION was not advised already, then its advice info will be initialized. Redefining a piece of advice whose name is part of the cache-id will clear the cache."]) (byte-code "MM!\"MMMMMM!!MMMMMMMMMMMMM!0MMMMMMM" [ad-macrofy (macro . #[(definition) "\nE" [cons 'macro definition] 3]) ad-lambdafy (macro . #[(definition) " D" [cdr definition] 2]) boundp ad-special-forms mapcar symbol-function (and catch cond condition-case defconst defmacro defun defvar function if interactive let let* or prog1 prog2 progn quote save-excursion save-restriction save-window-excursion setq setq-default unwind-protect while with-output-to-temp-buffer) ad-special-form-p (macro . #[(definition) " E" [memq definition ad-special-forms] 3]) ad-interactive-p (macro . #[(definition) " D" [commandp definition] 2]) ad-subr-p (macro . #[(definition) " D" [subrp definition] 2]) ad-macro-p (macro . #[(definition) "\nDE" [eq car-safe definition 'macro] 3]) ad-lambda-p (macro . #[(definition) "\nDE" [eq car-safe definition 'lambda] 3]) ad-advice-p (macro . #[(definition) "\nDE" [eq car-safe definition 'advice] 3]) fboundp byte-code-function-p compiled-function-p ad-compiled-p (macro . #[(definition) "\nD\nD\nDDEE" [or byte-code-function-p definition and ad-macro-p ad-lambdafy] 7]) ad-compiled-code (macro . #[(compiled-definition) "\nD\nD\nF" [if ad-macro-p compiled-definition ad-lambdafy] 4]) ad-lambda-expression #[(definition) "==A=Ać" [definition lambda macro advice nil] 2] ad-arglist #[(definition &optional name) " ! = A! = A H : !A@ !! \"\"͔͕O!!" [byte-code-function-p definition macro 0 ad-lambda-expression subrp name ad-subr-arglist format "%s" string-match "^#]+\\)>$" intern 1] 5] ad-define-subr-args (macro . #[(subr arglist) " DF" [put subr 'ad-subr-arglist list arglist] 5]) ad-undefine-subr-args (macro . #[(subr) " F" [put subr 'ad-subr-arglist nil] 4]) ad-subr-args-defined-p (macro . #[(subr) " E" [get subr 'ad-subr-arglist] 3]) ad-get-subr-args (macro . #[(subr) "\nED" [car get subr 'ad-subr-arglist] 4]) ad-subr-arglist #[(subr-name) "NN@\" \" ɔɕ#@C#N@)" [subr-name ad-subr-arglist ad-real-documentation t doc string-match "[\n ]*\narguments: ?\\((.*)\\)\n?\\'" put read-from-string 1 (&rest ad-subr-args)] 8] ad-docstring #[(definition) " ! = A! \" !AA@;!)" [byte-code-function-p definition macro ad-real-documentation t ad-lambda-expression docstring natnump] 4] ad-interactive-form #[(definition) " ! = A! ! = A HD = = !!" [byte-code-function-p definition macro commandp interactive 5 advice lambda ad-lambda-expression] 3] ad-body-forms #[(definition) " ! = A!Ç : !Ū !Ū\\ !AA" [byte-code-function-p definition macro nil ad-docstring 1 0 ad-interactive-form ad-lambda-expression] 3] ad-advised-definition-docstring-regexp "^\\$ad-doc: \\(.+\\)\\$$" ad-make-advised-definition-docstring #[(function) " !\"" [format "$ad-doc: %s$" prin1-to-string function] 4] ad-advised-definition-p #[(definition) "==!=A!!; \")" [definition lambda macro byte-code-function-p ad-docstring docstring string-match ad-advised-definition-docstring-regexp] 4] ad-definition-type #[(definition) "=! >ćŇ=!=A!ȇ=ɇ" [definition macro subrp ad-special-forms special-form subr lambda byte-code-function-p function advice] 2] ad-has-proper-definition #[(function) "9!K=?" [function fboundp autoload] 2] ad-real-definition #[(function) " ! K9\n!\n)" [ad-has-proper-definition function definition ad-real-definition] 3] ad-real-orig-definition #[(function) "NNA!" [function ad-advice-info ad-real-definition origname] 4] ad-is-compilable #[(function) " ! K= K= K! K= KA!?" [ad-has-proper-definition function lambda macro byte-code-function-p] 2]] 3) (fset 'ad-compile-function #[(function) " ! !" [ad-is-compilable function byte-compile] 2 "\ Byte-compiles FUNCTION (or macro) if it is not yet compiled." "aByte-compile function: "]) (byte-code "MMMMMMMMMMMM" [ad-prognify #[(forms) "GX@B" [forms 1 progn] 2] ad-parse-arglist #[(arglist) " >A@ !>A! >A !>A!  \n E+" [nil required optional rest &rest arglist reverse &optional] 5] ad-retrieve-args-form #[(arglist) " !\n8\n@\"\nA@\" D FC$*" [ad-parse-arglist arglist parsed-arglist 2 rest append (list) mapcar #[(req) "\nD\nF" [list quote req 'required] 4] #[(opt) "\nD\nF" [list quote opt 'optional] 4] list quote 'rest] 8] ad-arg-binding-field #[(binding field) "=\n@=\nA@=\nAA@" [field name binding value type] 2] ad-list-access #[(position list) "U\nU\nD\nE" [position 0 list 1 cdr nthcdr] 3] ad-element-access #[(position list) "U DU DD E" [position 0 car list 1 cdr nth] 3] ad-access-argument #[(arglist index) " !\n@\nA@\"\n8 GW 8 GZD+" [ad-parse-arglist arglist parsed-arglist append reqopt-args 2 rest-arg index] 3] ad-get-argument #[(arglist index) " \n\": @ A@\" )" [ad-access-argument arglist index argument-access ad-element-access] 4] ad-set-argument #[(arglist index value-form) " \n\": @ A@\"E E\n #)" [ad-access-argument arglist index argument-access setcar ad-list-access value-form setq error "ad-set-argument: No argument at position %d of `%s'"] 5] ad-get-arguments #[(arglist index) " !\n@\nA@\"\n8 GW \"E GZ\"," [ad-parse-arglist arglist parsed-arglist append reqopt-args 2 rest-arg nil args-form index (list) nconc ad-list-access] 4] ad-set-arguments #[(arglist index values-form) "\" 9 \"#\nB @U A@ \"E @S A@\" \"E\nBT T4\n#\nGU\n@#DCC\n!C$+" [0 nil set-forms argument-access values-index ad-access-argument arglist index 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) "=" [form ad-vAlUeS] 2] (lambda (form) values-form) append (let) values-form reverse] 6] ad-insert-argument-access-forms #[(definition arglist) " #" [ad-substitute-tree #[(form) "=>A" [form ad-arg-bindings (ad-get-arg ad-get-args ad-set-arg ad-set-args)] 2] #[(form) "= !@A@A \"A@= \"=  #= \"=  #+" [form ad-arg-bindings ad-retrieve-args-form arglist ad-insert-argument-access-forms val index accessor 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] definition] 4]] 2) (fset 'ad-map-arglists #[(source-arglist target-arglist) " !\n@\nA@\"\n8!@A@\" 8\n\n   ΪD C\" \n G \"\"\"." [ad-parse-arglist source-arglist parsed-source-arglist append source-reqopt-args 2 source-rest-arg target-arglist parsed-target-arglist target-reqopt-args target-rest-arg need-apply -1 target-arg-index apply funcall function mapcar #[(arg) "T\n\"" [target-arg-index ad-get-argument source-arglist] 3]] 8 "\ Makes `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))'."]) (byte-code "MMMMMMMMMMMMM" [ad-make-mapped-call #[(source-arglist target-arglist target-function) " \n\"@= AAB A D)" [ad-map-arglists source-arglist target-arglist mapped-form funcall target-function quote] 5] ad-make-single-advice-docstring #[(advice class &optional style) "\n8! = = \n@ ʪ % !!\n@ ʪ %)" [ad-docstring 3 advice advice-docstring style plain freeze format "Permanent %s-advice `%s':%s%s" class "\n" "" "%s-advice `%s':%s%s" capitalize symbol-name] 6] ad-make-advised-docstring #[(function &optional style) " !\n!!\n\"\n C\n = Q\nB\n@ \"@ #  \nB\nA_*AD*\n\n#-" [ad-real-orig-definition function origdef symbol-name ad-definition-type origtype ad-real-documentation t origdoc nil paragraphs advice-docstring style plain "This " " is advised." ad-advice-classes class ad-dO-vAr ad-get-enabled-advices advice ad-make-single-advice-docstring mapconcat identity "\n\n"] 5] ad-make-plain-docstring #[(function) " \"" [ad-make-advised-docstring function plain] 3] ad-make-freeze-docstring #[(function) " \"" [ad-make-advised-docstring function freeze] 3] ad-advised-arglist #[(function) "" [ad-dO-eXiT (byte-code "\n\"\n\"\n\"#@8!  \")Aa*Ƈ" [append ad-get-enabled-advices function before around after nil advice ad-dO-vAr ad-arglist 3 arglist throw ad-dO-eXiT] 7)] 2] ad-advised-interactive-form #[(function) "" [ad-dO-eXiT (byte-code "\n\"\n\"\n\"#@8!  \")Aa*Ƈ" [append ad-get-enabled-advices function before around after nil advice ad-dO-vAr ad-interactive-form 3 interactive-form throw ad-dO-eXiT] 7)] 2] ad-make-advised-definition #[(function) "N!!NA ! ! \n> = \"!! Ԫ !!@G\"DD)   ݪ D\"ED  DD #F #& ̪ 誁!&\"\"\"&. " [function ad-advice-info ad-has-redefining-advice ad-real-orig-definition origdef origname commandp orig-interactive-p subrp orig-subr-p ad-special-forms orig-special-form-p macro orig-macro-p ad-arglist orig-arglist ad-advised-arglist advised-arglist ad-advised-interactive-form advised-interactive-form nil ad-interactive-form ad-parse-arglist reqargs interactive quote make-list (interactive) interactive-form macroexpand eval cons ad-get-arguments 0 if (interactive-p) call-interactively ad-make-mapped-call orig-form ad-assemble-advised-definition special-form ad-make-advised-definition-docstring ad-get-enabled-advices before around after] 12] ad-assemble-advised-definition #[(type args docstring interactive orig &optional befores arounds afters) "@A@ !D8!\"C 8!\"AP*E!@A@8!!#A_* ! EC C\"@A@\n\n!D8!\"C\n8!\"AP*>CCC\n=᪁C#C& \"-" [nil definition after-forms around-form-protected around-form before-forms befores advice ad-dO-vAr append unwind-protect ad-prognify ad-body-forms 3 setq ad-return-value orig reverse arounds t ad-substitute-tree #[(form) "=" [form ad-do-it] 2] (lambda (form) around-form) afters type (macro special-form) (macro) (lambda) args docstring interactive (let (ad-return-value)) special-form (list 'quote ad-return-value) ad-insert-argument-access-forms] 12] ad-make-hook-form #[(function hook-name) " \"\" \"!)" [mapcar #[(advice) "\n8!" [ad-body-forms 3 advice] 3] ad-get-enabled-advices function hook-name hook-forms ad-prognify apply append] 6] ad-get-cache-definition (macro . #[(function) "\nED" [car ad-get-advice-info-field function 'cache] 4]) ad-get-cache-id (macro . #[(function) "\nED" [cdr ad-get-advice-info-field function 'cache] 4]) ad-set-cache (macro . #[(function definition id) " EF" [ad-set-advice-info-field function 'cache cons definition id] 6])] 2) (fset 'ad-clear-cache #[(function) " #" [ad-set-advice-info-field function cache nil] 4 "\ 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." (byte-code "!C" [ad-read-advised-function "Clear cached definition of: "] 2)]) (byte-code "MMMMMMM" [ad-make-cache-id #[(function) " ! NA@ \"\" \"\" \"\" ! \" !Ъ \" != ! !*" [ad-real-orig-definition function cache ad-advice-info cached-definition original-definition mapcar #[(advice) "@" [advice] 1] ad-get-enabled-advices before #[(advice) "@" [advice] 1] around #[(advice) "@" [advice] 1] after ad-definition-type ad-arglist t ad-interactive-form] 8] ad-get-cache-class-id #[(function class) " NAA = @ = A@ 8)" [cache function ad-advice-info cache-id class before around 2] 3] ad-verify-cache-class-id #[(cache-class-id advices) "" [ad-dO-eXiT (byte-code " @\n8 @\n@= A\" Aa *?" [advices nil advice ad-dO-vAr 2 cache-class-id throw ad-dO-eXiT] 4)] 2] ad-cache-id-verification-code #[(function) " NAA @ NA\"ȉ 8 NA\"ˉ 8 NA\"Ή ! NA@ 8!=ԉ 8= \" 8!؉ 8!!* *" [cache function ad-advice-info before-advice-mismatch code cache-id ad-verify-cache-class-id before around-advice-mismatch 1 around after-advice-mismatch 2 after definition-type-mismatch ad-real-orig-definition cached-definition original-definition 3 ad-definition-type arglist-mismatch 4 t ad-arglist interactive-form-mismatch 5 ad-interactive-form verified] 5] ad-verify-cache-id #[(function) " !=" [ad-cache-id-verification-code function verified] 2] ad-preactivate-advice #[(function advice class position) " ! K N!Ȏ \n  $  \n@# ! \" ! NA@ NA@ NAAD-" [fboundp function function-defined-p old-definition ad-copy-tree ad-advice-info old-advice-info ad-advised-functions ((byte-code " # M !" [put function ad-advice-info old-advice-info function-defined-p old-definition fmakunbound] 4)) ad-add-advice advice class position ad-enable-advice ad-clear-cache ad-activate nil ad-is-active cache] 6] ad-activate-advised-definition #[(function compile) " ! NA@ !M ! K=? K NAAB# ! KB# K !B#)" [ad-verify-cache-id function cache ad-advice-info verified-cached-definition ad-make-advised-definition compile ad-compile-function ad-set-advice-info-field ad-clear-cache nil ad-make-cache-id] 7]] 2) (fset 'ad-handle-definition #[(function) " NA!K) ! K =? !?> #= M NA M= \" NA M*" [origname function ad-advice-info fboundp ad-real-definition current-definition original-definition ad-advised-definition-p ad-redefinition-action (accept discard warn) error "ad-handle-definition (see its doc): `%s' %s" "illegally redefined" discard warn message "ad-handle-definition: `%s' got redefined"] 5 "\ Handles 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."]) (fset 'ad-activate #[(function &optional compile) "N\"!NA ! K)!!! \"#\"!!" [function ad-advice-info error "ad-activate: `%s' is not advised" ad-handle-definition origname fboundp ad-has-any-advice ad-unadvise ad-has-redefining-advice ad-activate-advised-definition compile ad-set-advice-info-field active t eval ad-make-hook-form activation ad-deactivate] 4 "\ Activates 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. With an argument (COMPILE is non-nil) the resulting function (or a compilable cached definition) will also be compiled. 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." (byte-code "!\nD" [ad-read-advised-function "Activate advice of: " current-prefix-arg] 2)]) (fset 'ad-deactivate #[(function) "N\"!!NA!K)\"NA!K)M#\"!" [function ad-advice-info error "ad-deactivate: `%s' is not advised" ad-is-active ad-handle-definition origname fboundp "ad-deactivate: `%s' has no original definition" ad-set-advice-info-field active nil eval ad-make-hook-form deactivation] 4 "\ Deactivates 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'." (byte-code "\"C" [ad-read-advised-function "Deactivate advice of: " ad-is-active] 3)]) (fset 'ad-update #[(function &optional compile) " ! K! K= KA!\"" [ad-is-active function ad-activate compile byte-code-function-p macro] 4 "\ Update the advised definition of FUNCTION if its advice is active. With a prefix argument or if the current definition is compiled compile the resulting advised definition." (byte-code "\"C" [ad-read-advised-function "Update advised definition of: " ad-is-active] 3)]) (fset 'ad-unadvise #[(function) "N!!NA!#! \" \" " [function ad-advice-info ad-is-active ad-deactivate fmakunbound origname put nil delq assoc symbol-name ad-advised-functions] 4 "\ Deactivates FUNCTION and then removes all its advice information. If FUNCTION was not advised this will be a noop." (byte-code "!C" [ad-read-advised-function "Unadvise function: "] 2)]) (fset 'ad-recover #[(function) "NNA\n!\nK)NA\n!\nK)MNA!#!\n\"\n\"\n" [function ad-advice-info origname fboundp fmakunbound put nil delq assoc symbol-name ad-advised-functions] 4 "\ Tries to recover FUNCTION's original definition and unadvises it. This is more low-level than `ad-unadvise' because it does not do any deactivation which might run hooks and get into other trouble. Use in emergencies." (byte-code " $!C" [intern completing-read "Recover advised function: " obarray nil t] 6)]) (fset 'ad-activate-regexp #[(regexp &optional compile) " @\n@!\n#\n \" Ad*" [ad-advised-functions nil function ad-dO-vAr intern ad-find-some-advice any regexp ad-activate compile] 5 "\ Activates functions with an advice name containing a REGEXP match. With prefix argument compiles resulting advised definitions." (byte-code "!\nD" [ad-read-regexp "Activate via advice regexp: " current-prefix-arg] 2)]) (fset 'ad-deactivate-regexp #[(regexp) " @\n@!\n#\n! Af*" [ad-advised-functions nil function ad-dO-vAr intern ad-find-some-advice any regexp ad-deactivate] 5 "\ Deactivates functions with an advice name containing REGEXP match." (byte-code "!C" [ad-read-regexp "Deactivate via advice regexp: "] 2)]) (fset 'ad-update-regexp #[(regexp &optional compile) " @\n@!\n#\n \" Ad*" [ad-advised-functions nil function ad-dO-vAr intern ad-find-some-advice any regexp ad-update compile] 5 "\ Updates functions with an advice name containing a REGEXP match. With prefix argument compiles resulting advised definitions." (byte-code "!\nD" [ad-read-regexp "Update via advice regexp: " current-prefix-arg] 2)]) (fset 'ad-activate-all #[(&optional compile) " @\n@!\n! An*" [ad-advised-functions nil function ad-dO-vAr intern ad-activate] 3 "\ Activates all currently advised functions. With prefix argument compiles resulting advised definitions." "P"]) (fset 'ad-deactivate-all #[nil " @\n@!\n! An*" [ad-advised-functions nil function ad-dO-vAr intern ad-deactivate] 3 "\ Deactivates all currently advised functions." nil]) (fset 'ad-update-all #[(&optional compile) " @\n@!\n\" Al*" [ad-advised-functions nil function ad-dO-vAr intern ad-update compile] 4 "\ Updates all currently advised functions. With prefix argument compiles resulting advised definitions." "P"]) (fset 'ad-unadvise-all #[nil " @\n@!\n! An*" [ad-advised-functions nil function ad-dO-vAr intern ad-unadvise] 3 "\ Unadvises all currently advised functions." nil]) (fset 'ad-recover-all #[nil " @\n@!Ə Am*" [ad-advised-functions nil function ad-dO-vAr intern (ad-recover function) ((error))] 4 "\ Recovers all currently advised functions. Use in emergencies." nil]) (byte-code "!" [boundp ad-defadvice-flags (("protect") ("disable") ("activate") ("compile") ("preactivate") ("freeze"))] 2) (fset 'defadvice '(macro . #[(function args &rest body) " ! \" @ ! \" A@!\" AA @! @ A @< @ A \">>? D#$>   $>KK !NA##!#K)!MNA##!#K) MM ! $!M ! \"   $+--@=/-@A-@ADDDD DDEE/ D\"E* DD D DC D@=@ADD@DA@DFC> D>EC DC%. " [ad-name-p function error "defadvice: Illegal function name: %s" args class ad-class-p "defadvice: Illegal advice class: %s" name "defadvice: Illegal advice name: %s" ad-position-p position arglist mapcar #[(flag) "\n! \"=\n \" !\n\")" [try-completion symbol-name flag ad-defadvice-flags completion t assoc intern error "defadvice: Illegal or ambiguous flag: %s"] 4] flags ad-make-advice protect disable append (advice) lambda body advice preactivate ad-preactivate-advice preactivation nil unique-origname freeze ad-make-advised-definition-docstring ad-make-origname ad-oRiGdEf-1 ad-oRiGdEf-0 ((byte-code " M M" [ad-make-advised-definition-docstring ad-oRiGdEf-0 ad-make-origname ad-oRiGdEf-1] 2)) origname ad-advice-info fboundp ad-make-freeze-docstring intern format "%s-%s-%s" (lambda (x) unique-origname) ad-has-proper-definition "defadvice: `freeze' needs proper definition of `%s'" redefinition macro macro-p progn if not quote fset symbol-function defmacro defun (progn) ad-add-advice ad-set-cache ad-macrofy activate ad-activate compile t] 9 "\ Defines 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 the current advice state. 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. Look at the file `advice.el' for comprehensive documentation."])) (fset 'ad-with-originals '(macro . #[(functions &rest body) " \"  \" #D \"\"E*" [-1 index mapcar #[(function) "T\"!DDD" [index intern format "ad-oRiGdEf-%d" symbol-function quote function] 4] functions current-bindings let append unwind-protect (progn) #[(function) "T D DD8@EE" [index ad-real-fset quote function or ad-get-orig-definition current-bindings] 6] body #[(function) "T D 8@E" [index ad-real-fset quote function current-bindings] 4]] 9 "\ Binds FUNCTIONS to their original definitions and executes 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."])) (byte-code "N#!Ƈ" [ad-with-originals lisp-indent-hook put 1 boundp ad-defined-function nil] 4) (fset 'ad-activate-defined-function #[(&optional function) " N!K!K=KA!\"" [function ad-defined-function ad-advice-info ad-real-definition ad-activate byte-code-function-p macro] 4 "\ Activates the advice of an advised and defined FUNCTION. If the current definition of FUNCTION is byte-compiled then the advised definition will be compiled too. FUNCTION defaults to the value of `ad-defined-function'."]) (byte-code "!!$BB#$BB#$B#$B#$B#$B#$B#$B# \"B.//@...N!#/A/g*!3!5!7!9!3!35S\\!#?7!@PA9!BC?DAEC?DAEB +;FGMHIM" [boundp ad-advised-definers (defun defmacro fset defalias define-function) ad-advised-byte-compilers (byte-compile-from-buffer byte-compile-top-level) ad-add-advice defun (ad-definition-hooks nil t (advice lambda nil "Whenever a function gets re/defined with `defun' all hook functions\nin `ad-definition-hooks' will be run after the re/definition with\n`ad-defined-function' bound to the name of the function." (let ((ad-defined-function (ad-get-arg 0))) (run-hooks 'ad-definition-hooks)))) after first ad-set-advice-info-field cache macro #[(arg1 arg2 &rest args) " DB! !) )D" [nil ad-return-value eval ad-Orig-defun arg1 arg2 args ad-defined-function run-hooks ad-definition-hooks quote] 4 "$ad-doc: defun$"] (nil nil (ad-definition-hooks) special-form t nil) defmacro (ad-definition-hooks nil t (advice lambda nil "Whenever a macro gets re/defined with `defmacro' all hook functions\nin `ad-definition-hooks' will be run after the re/definition with\n`ad-defined-function' bound to the name of the function." (let ((ad-defined-function (ad-get-arg 0))) (run-hooks 'ad-definition-hooks)))) #[(arg1 arg2 &rest args) " DB! !) )D" [nil ad-return-value eval ad-Orig-defmacro arg1 arg2 args ad-defined-function run-hooks ad-definition-hooks quote] 4 "$ad-doc: defmacro$"] (nil nil (ad-definition-hooks) special-form t nil) fset (ad-definition-hooks nil t (advice lambda nil "Whenever a function gets re/defined with `fset' all hook functions\nin `ad-definition-hooks' will be run after the re/definition with\n`ad-defined-function' bound to the name of the function. This advice was\nmainly created to handle forward-advice for byte-compiled files created\nby jwz's byte-compiler used in Lemacs.\nCAUTION: If you need the primitive `fset' behavior either deactivate\n its advice or use `ad-real-fset' instead!" (let ((ad-defined-function (ad-get-arg 0))) (run-hooks 'ad-definition-hooks)))) #[(sym newdef) " \" !) )" [nil ad-return-value ad-Orig-fset sym newdef ad-defined-function run-hooks ad-definition-hooks] 3 "$ad-doc: fset$"] (nil nil (ad-definition-hooks) subr t nil) defalias (ad-definition-hooks nil t (advice lambda nil "Whenever a function gets re/defined with `defalias' all hook functions\nin `ad-definition-hooks' will be run after the re/definition with\n`ad-defined-function' bound to the name of the function." (let ((ad-defined-function (ad-get-arg 0))) (ad-with-originals (defalias) (run-hooks 'ad-definition-hooks))))) #[(sym newdef) " \" KȎNA  ! K)M!+ )" [nil ad-return-value ad-Orig-defalias sym newdef ad-defined-function defalias ad-oRiGdEf-0 ((byte-code " M" [defalias ad-oRiGdEf-0] 2)) origname ad-advice-info fboundp run-hooks ad-definition-hooks] 4 "$ad-doc: defalias$"] (nil nil (ad-definition-hooks) subr t nil) define-function (ad-definition-hooks nil t (advice lambda nil "Whenever a function gets re/defined with `define-function' all hook\nfunctions in `ad-definition-hooks' will be run after the re/definition with\n`ad-defined-function' bound to the name of the function." (let ((ad-defined-function (ad-get-arg 0))) (ad-with-originals (define-function) (run-hooks 'ad-definition-hooks))))) #[(sym newdef) " \" KȎNA  ! K)M!+ )" [nil ad-return-value ad-Orig-define-function sym newdef ad-defined-function define-function ad-oRiGdEf-0 ((byte-code " M" [define-function ad-oRiGdEf-0] 2)) origname ad-advice-info fboundp run-hooks ad-definition-hooks] 4 "$ad-doc: define-function$"] (nil nil (ad-definition-hooks) subr t nil) documentation (ad-advised-docstring nil t (advice lambda nil "Builds an advised docstring if FUNCTION is advised." (if (and (stringp ad-return-value) (string-match ad-advised-definition-docstring-regexp ad-return-value)) (let ((function (car (read-from-string ad-return-value (match-beginning 1) (match-end 1))))) (cond ((ad-is-advised function) (setq ad-return-value (ad-make-advised-docstring function)) (if (not (ad-get-arg 1)) (setq ad-return-value (substitute-command-keys ad-return-value))))))))) #[(function &optional raw) " \"; \" Ȕȕ#@N ! !) )" [nil ad-return-value ad-Orig-documentation function raw string-match ad-advised-definition-docstring-regexp read-from-string 1 ad-advice-info ad-make-advised-docstring substitute-command-keys] 5 "$ad-doc: documentation$"] (nil nil (ad-advised-docstring) subr t nil) byte-compile-from-buffer (ad-deactivate-defun-defmacro nil t (advice lambda nil "Deactivates `defun/defmacro' for proper compilation when they are embedded." (let ((ad-advised-definers '(fset defalias define-function))) (ad-with-originals (defun defmacro) ad-do-it)))) around #[(inbuffer filename &optional eval) "KKȎNA  ! K)MNA  ! K)M #, )" [nil ad-return-value (fset defalias define-function) ad-advised-definers defun defmacro ad-oRiGdEf-1 ad-oRiGdEf-0 ((byte-code " M M" [defun ad-oRiGdEf-0 defmacro ad-oRiGdEf-1] 2)) origname ad-advice-info fboundp ad-Orig-byte-compile-from-buffer inbuffer filename eval] 4 "$ad-doc: byte-compile-from-buffer$"] (nil (ad-deactivate-defun-defmacro) nil function t t) byte-compile-top-level (ad-deactivate-defun-defmacro nil t (advice lambda nil "Deactivates `defun/defmacro' for proper compilation when they are embedded." (let ((ad-advised-definers '(fset defalias define-function))) (ad-with-originals (defun defmacro) ad-do-it)))) #[(form &optional for-effect output-type) "KKȎNA  ! K)MNA  ! K)M #, )" [nil ad-return-value (fset defalias define-function) ad-advised-definers defun defmacro ad-oRiGdEf-1 ad-oRiGdEf-0 ((byte-code " M M" [defun ad-oRiGdEf-0 defmacro ad-oRiGdEf-1] 2)) origname ad-advice-info fboundp ad-Orig-byte-compile-top-level form for-effect output-type] 4 "$ad-doc: byte-compile-top-level$"] (nil (ad-deactivate-defun-defmacro) nil function t t) append nil advised-function ad-dO-vAr put ad-advice-info ad-copy-tree byte-constant 192 byte-constant-limit 64 byte-constant2 129 byte-fset 77 ad-byte-code-fset-regexp format "[%s-%s]" char-to-string constant-reference "[-][-]" constant2-reference fset-opcode "\\(" "\\|" "\\)" ad-find-fset-in-byte-code #[(code constants start) " \n #ĉ\n HU\n TH\n TH_\\ T\n H Z T\n HU\n TH\n TH_\\ T\n H Z T\nH\n H E+" [string-match ad-byte-code-fset-regexp code start nil code-index name-index byte-constant2 256 byte-constant constants] 5] ad-scan-byte-code-for-fsets #[(ad-code ad-constants) "KMď" [byte-code ad-real-byte-code nil (byte-code " AA@# @9o @!i @K A@=` @!)UKM)" [(0 0 0) fset-args ad-find-fset-in-byte-code ad-code ad-constants fboundp ad-defined-function run-hooks ad-definition-hooks byte-code ad-advised-byte-code] 4) ((error))] 3]] 12) (fset 'ad-advised-byte-code #[(ad-cOdE ad-cOnStAnTs ad-dEpTh) " \n # \n\"" [ad-real-byte-code ad-cOdE ad-cOnStAnTs ad-dEpTh load-in-progress ad-scan-byte-code-for-fsets] 4 "\ Modified version of `byte-code' subr used by the Advice package. `byte-code' has been modified to allow automatic activation of forward advice for functions that are defined in byte-compiled files. See `ad-real-byte-code' for original documentation."]) (fset 'ad-recover-byte-code #[nil "KM" [byte-code ad-real-byte-code] 2 "\ Recovers the real `byte-code' functionality." nil]) (byte-code "MM" [ad-enable-definition-hooks #[nil " @\n#\n\" Al* \n @\n\n#\n\" Ai*KM" [ad-advised-definers nil definer ad-dO-vAr ad-enable-advice after ad-definition-hooks ad-activate compile ad-advised-byte-compilers byte-compiler around ad-deactivate-defun-defmacro byte-code ad-advised-byte-code] 5] ad-disable-definition-hooks #[nil "  @ # ! Am* \n @\n\n#\n\" Ai*‡" [ad-recover-byte-code ad-advised-definers nil definer ad-dO-vAr ad-disable-advice after ad-definition-hooks ad-update ad-advised-byte-compilers byte-compiler around ad-deactivate-defun-defmacro compile] 5]] 2) (fset 'ad-start-advice #[nil "#\" \n>\n\nB\n\"\n" [ad-enable-advice documentation after ad-advised-docstring ad-activate compile ad-activate-on-definition ad-enable-definition-hooks ad-disable-definition-hooks ad-activate-defined-function ad-definition-hooks delq] 4 "\ Redefines some primitives to start the advice magic. If `ad-activate-on-definition' is t then advice information will automatically get activated whenever an advised function gets defined or redefined. This will enable goodies such as forward advice and automatically enable function definition hooks. If its value is nil but the value of `ad-enable-definition-hooks' is t then definition hooks will be enabled without having automatic advice activation, otherwise function definition hooks will be disabled too. If definition hooks are enabled then functions stored in `ad-definition-hooks' are run whenever a function gets defined or redefined." nil]) (fset 'ad-stop-advice #[nil " #!  \" " [ad-recover-byte-code ad-disable-advice documentation after ad-advised-docstring ad-update ad-disable-definition-hooks delq ad-activate-defined-function ad-definition-hooks] 4 "\ Undefines some primitives to stop the advice magic. This can also be used to recover from advice related emergencies." nil]) (fset 'ad-recover-normality #[nil " ‰" [ad-recover-byte-code ad-recover-all nil ad-advised-functions] 2 "\ Undoes all advice related redefinitions and unadvises everything. Use only in REAL emergencies." nil]) (byte-code "K!K=KA! !" [ad-start-advice-on-load byte-code-function-p ad-start-advice macro provide advice] 2)