[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/help-fns.el,v
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/help-fns.el,v |
Date: |
Sun, 14 Oct 2007 22:47:59 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Richard M. Stallman <rms> 07/10/14 22:47:58
Index: help-fns.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/help-fns.el,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -b -r1.102 -r1.103
--- help-fns.el 10 Oct 2007 19:18:53 -0000 1.102
+++ help-fns.el 14 Oct 2007 22:47:58 -0000 1.103
@@ -251,8 +251,15 @@
;;;###autoload
(defun describe-function-1 (function)
- (let* ((def (if (symbolp function)
- (symbol-function function)
+ (let* ((advised (and (featurep 'advice) (ad-get-advice-info function)))
+ ;; If the function is advised, get the symbol that has the
+ ;; real definition.
+ (real-function
+ (if advised (cdr (assq 'origname advised))
+ function))
+ ;; Get the real definition.
+ (def (if (symbolp real-function)
+ (symbol-function real-function)
function))
file-name string
(beg (if (commandp def) "an interactive " "a ")))
@@ -334,7 +341,7 @@
(with-current-buffer standard-output
(save-excursion
(re-search-backward "`\\([^`']+\\)'" nil t)
- (help-xref-button 1 'help-function-def function file-name))))
+ (help-xref-button 1 'help-function-def real-function file-name))))
(princ ".")
(terpri)
(when (commandp function)
@@ -383,8 +390,9 @@
((listp arglist)
(format "%S" (help-make-usage function arglist)))
((stringp arglist) arglist)
- ;; Maybe the arglist is in the docstring of the alias.
- ((let ((fun function))
+ ;; Maybe the arglist is in the docstring of a symbol
+ ;; this one is aliased to.
+ ((let ((fun real-function))
(while (and (symbolp fun)
(setq fun (symbol-function fun))
(not (setq usage (help-split-fundoc
- [Emacs-diffs] Changes to emacs/lisp/help-fns.el,v, Stefan Monnier, 2007/10/09
- [Emacs-diffs] Changes to emacs/lisp/help-fns.el,v, Stefan Monnier, 2007/10/10
- [Emacs-diffs] Changes to emacs/lisp/help-fns.el,v,
Richard M. Stallman <=
- [Emacs-diffs] Changes to emacs/lisp/help-fns.el,v, Juanma Barranquero, 2007/10/15
- [Emacs-diffs] Changes to emacs/lisp/help-fns.el,v, Juanma Barranquero, 2007/10/15
- [Emacs-diffs] Changes to emacs/lisp/help-fns.el,v, Richard M. Stallman, 2007/10/18
- [Emacs-diffs] Changes to emacs/lisp/help-fns.el,v, Richard M. Stallman, 2007/10/18
- [Emacs-diffs] Changes to emacs/lisp/help-fns.el,v, John Paul Wallington, 2007/10/19