From 7aefbb0613d601a127cd7a5f6131ee93fa70db83 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 13 Mar 2008 15:28:04 +0000 Subject: (defadvice): Add usage pattern. --- lisp/emacs-lisp/advice.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index a9e2b58f0dc..4babd844cf9 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -3817,7 +3817,10 @@ 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." +See Info node `(elisp)Advising Functions' for comprehensive documentation. +usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) + [DOCSTRING] [INTERACTIVE-FORM] + BODY...)" (declare (doc-string 3)) (if (not (ad-name-p function)) (error "defadvice: Invalid function name: %s" function)) -- cgit v1.2.1 From 2966eaebc8ee7de693cd5abbf4a5edfc08a59fb9 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 31 Mar 2008 22:12:22 +0000 Subject: (find-function-search-for-symbol): Strip extension from .emacs.el to make sure symbol is searched in .emacs too. --- lisp/emacs-lisp/find-func.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 9fe700d9b7f..2022d3ab7d4 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -231,8 +231,12 @@ The search is done in the source for library LIBRARY." (setq symbol (get symbol 'definition-name))) (if (string-match "\\`src/\\(.*\\.c\\)\\'" library) (find-function-C-source symbol (match-string 1 library) type) - (if (string-match "\\.el\\(c\\)\\'" library) - (setq library (substring library 0 (match-beginning 1)))) + (when (string-match "\\.el\\(c\\)\\'" library) + (setq library (substring library 0 (match-beginning 1)))) + ;; Strip extension from .emacs.el to make sure symbol is searched in + ;; .emacs too. + (when (string-match "\\.emacs\\(.el\\)" library) + (setq library (substring library 0 (match-beginning 1)))) (let* ((filename (find-library-name library)) (regexp-symbol (cdr (assq type find-function-regexp-alist)))) (with-current-buffer (find-file-noselect filename) -- cgit v1.2.1