Mercurial > emacs
comparison lisp/emacs-lisp/advice.el @ 80328:349f51baa515
(defadvice): Add usage pattern.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 13 Mar 2008 15:27:53 +0000 |
parents | 78ee6fae0e41 |
children | 4e76a03232e5 |
comparison
equal
deleted
inserted
replaced
80327:4cc6af526cc6 | 80328:349f51baa515 |
---|---|
3815 Frozen advices cannot be undone, they behave like a hard redefinition of | 3815 Frozen advices cannot be undone, they behave like a hard redefinition of |
3816 the advised function. `freeze' implies `activate' and `preactivate'. The | 3816 the advised function. `freeze' implies `activate' and `preactivate'. The |
3817 documentation of the advised function can be dumped onto the `DOC' file | 3817 documentation of the advised function can be dumped onto the `DOC' file |
3818 during preloading. | 3818 during preloading. |
3819 | 3819 |
3820 See Info node `(elisp)Advising Functions' for comprehensive documentation." | 3820 See Info node `(elisp)Advising Functions' for comprehensive documentation. |
3821 usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) | |
3822 [DOCSTRING] [INTERACTIVE-FORM] | |
3823 BODY...)" | |
3821 (declare (doc-string 3)) | 3824 (declare (doc-string 3)) |
3822 (if (not (ad-name-p function)) | 3825 (if (not (ad-name-p function)) |
3823 (error "defadvice: Invalid function name: %s" function)) | 3826 (error "defadvice: Invalid function name: %s" function)) |
3824 (let* ((class (car args)) | 3827 (let* ((class (car args)) |
3825 (name (if (not (ad-class-p class)) | 3828 (name (if (not (ad-class-p class)) |