aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman2007-10-14 22:49:39 +0000
committerRichard M. Stallman2007-10-14 22:49:39 +0000
commit72a200320042d793f427c63b36a2a9be8bd0390b (patch)
tree817de06c4e978a2816bfd3ab1ac43de9bd14c041 /lisp
parent15975e3514ed442cec07954afec1c5f247f5f147 (diff)
downloademacs-72a200320042d793f427c63b36a2a9be8bd0390b.tar.gz
emacs-72a200320042d793f427c63b36a2a9be8bd0390b.zip
(describe-function-1): Find source of advised functions.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog18
-rw-r--r--lisp/help-fns.el18
2 files changed, 31 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 40e4732d0cc..fa635a9385f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,17 @@
12007-10-14 Richard Stallman <rms@gnu.org>
2
3 * emacs-lisp/advice.el (documentation): Advice deleted.
4 Doc for advised functions is now handled at C level.
5 This is now handled at C level.
6 (ad-stop-advice, ad-start-advice): Don't enable or disable
7 advice for `documentation'.
8 (ad-advised-definition-docstring-regexp): Var deleted.
9 (ad-make-advised-definition-docstring): Store orig name
10 as text property of string.
11 (ad-advised-definition-p): Check for text property of docstring.
12
13 * help-fns.el (describe-function-1): Find source of advised functions.
14
12007-10-14 Juri Linkov <juri@jurta.org> 152007-10-14 Juri Linkov <juri@jurta.org>
2 16
3 * faces.el (describe-face): Allow handling a string as the face name. 17 * faces.el (describe-face): Allow handling a string as the face name.
@@ -371,6 +385,10 @@
371 385
372 * net/trampver.el: Update release number. 386 * net/trampver.el: Update release number.
373 387
3882007-10-09 Richard Stallman <rms@gnu.org>
389
390 * play/gamegrid.el (gamegrid-setup-default-font): Use face-spec-set.
391
3742007-10-09 Juanma Barranquero <lekktu@gmail.com> 3922007-10-09 Juanma Barranquero <lekktu@gmail.com>
375 393
376 * follow.el: Require easymenu. 394 * follow.el: Require easymenu.
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index eee0794b673..bf8d5f9a209 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -251,8 +251,15 @@ face (according to `face-differs-from-default-p')."
251 251
252;;;###autoload 252;;;###autoload
253(defun describe-function-1 (function) 253(defun describe-function-1 (function)
254 (let* ((def (if (symbolp function) 254 (let* ((advised (and (featurep 'advice) (ad-get-advice-info function)))
255 (symbol-function function) 255 ;; If the function is advised, get the symbol that has the
256 ;; real definition.
257 (real-function
258 (if advised (cdr (assq 'origname advised))
259 function))
260 ;; Get the real definition.
261 (def (if (symbolp real-function)
262 (symbol-function real-function)
256 function)) 263 function))
257 file-name string 264 file-name string
258 (beg (if (commandp def) "an interactive " "a "))) 265 (beg (if (commandp def) "an interactive " "a ")))
@@ -334,7 +341,7 @@ face (according to `face-differs-from-default-p')."
334 (with-current-buffer standard-output 341 (with-current-buffer standard-output
335 (save-excursion 342 (save-excursion
336 (re-search-backward "`\\([^`']+\\)'" nil t) 343 (re-search-backward "`\\([^`']+\\)'" nil t)
337 (help-xref-button 1 'help-function-def function file-name)))) 344 (help-xref-button 1 'help-function-def real-function file-name))))
338 (princ ".") 345 (princ ".")
339 (terpri) 346 (terpri)
340 (when (commandp function) 347 (when (commandp function)
@@ -383,8 +390,9 @@ face (according to `face-differs-from-default-p')."
383 ((listp arglist) 390 ((listp arglist)
384 (format "%S" (help-make-usage function arglist))) 391 (format "%S" (help-make-usage function arglist)))
385 ((stringp arglist) arglist) 392 ((stringp arglist) arglist)
386 ;; Maybe the arglist is in the docstring of the alias. 393 ;; Maybe the arglist is in the docstring of a symbol
387 ((let ((fun function)) 394 ;; this one is aliased to.
395 ((let ((fun real-function))
388 (while (and (symbolp fun) 396 (while (and (symbolp fun)
389 (setq fun (symbol-function fun)) 397 (setq fun (symbol-function fun))
390 (not (setq usage (help-split-fundoc 398 (not (setq usage (help-split-fundoc