I want to add advice to an alias to a function in an internal elisp package at work, gating the logic on a variable.
Both the function and the alias is marked autoload.
;;;###autoload (defun something-get () ....) ;;;###autoload (defalias 'something 'something-get)
What I want is:
(defvar enable-something-advice-p nil) (and enable-something-advice-p (defadvice something (before fix-something enable) ;;; do stuff )
- How do I make sure the advice takes effect? Just mark autoload?
- How do I make the advice conditional?