Function: ad-advice-position

ad-advice-position is a byte-compiled function defined in advice.el.gz.

Signature

(ad-advice-position FUNCTION CLASS NAME)

Documentation

Return position of first advice of FUNCTION in CLASS with NAME.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/advice.el.gz
(defun ad-advice-position (function class name)
  "Return position of first advice of FUNCTION in CLASS with NAME."
  (let* ((found-advice (ad-find-advice function class name))
	 (advices (ad-get-advice-info-field function class)))
    (if found-advice
	(- (length advices) (length (memq found-advice advices))))))