[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116238: * lisp/help-fns.el (help-C-file-name): Hand
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] trunk r116238: * lisp/help-fns.el (help-C-file-name): Handle advised functions. |
Date: |
Sun, 02 Feb 2014 02:25:18 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116238
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16478
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Sat 2014-02-01 21:25:05 -0500
message:
* lisp/help-fns.el (help-C-file-name): Handle advised functions.
* lisp/emacs-lisp/find-func.el (find-function-C-source): Idem.
* lisp/emacs-lisp/nadvice.el (advice--cd*r): New function.
* help-fns.el (describe-function-1): Use it.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/emacs-lisp/find-func.el
findfunc.el-20091113204419-o5vbwnq5f7feedwu-1249
lisp/emacs-lisp/nadvice.el nadvice.el-20121015213644-851fdxs2vximj8nr-1
lisp/help-fns.el helpfns.el-20091113204419-o5vbwnq5f7feedwu-2354
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-02-02 01:04:08 +0000
+++ b/lisp/ChangeLog 2014-02-02 02:25:05 +0000
@@ -1,3 +1,10 @@
+2014-02-02 Stefan Monnier <address@hidden>
+
+ * help-fns.el (help-C-file-name): Handle advised functions (bug#16478).
+ * emacs-lisp/find-func.el (find-function-C-source): Idem.
+ * emacs-lisp/nadvice.el (advice--cd*r): New function.
+ * help-fns.el (describe-function-1): Use it.
+
2014-02-02 Glenn Morris <address@hidden>
* register.el (register-preview-default): New function,
@@ -35,8 +42,8 @@
(ruby-smie-grammar): Make "." right-associative. Make its priority
lower than the ternary and all binary operators.
(ruby-smie-rules): Indent "(" relative to the first non-"."
- parent, or the first "." parent at indentation. Use
- `ruby-align-chained-calls' for indentation of "." tokens.
+ parent, or the first "." parent at indentation.
+ Use `ruby-align-chained-calls' for indentation of "." tokens.
(Bug#16593)
2014-01-31 Juri Linkov <address@hidden>
=== modified file 'lisp/emacs-lisp/find-func.el'
--- a/lisp/emacs-lisp/find-func.el 2014-01-01 07:43:34 +0000
+++ b/lisp/emacs-lisp/find-func.el 2014-02-02 02:25:05 +0000
@@ -219,7 +219,7 @@
(regexp-quote (symbol-name fun-or-var))
"\"")
(concat "DEFUN[ \t\n]*([ \t\n]*\""
- (regexp-quote (subr-name fun-or-var))
+ (regexp-quote (subr-name (advice--cd*r fun-or-var)))
"\""))
nil t)
(error "Can't find source for %s" fun-or-var))
=== modified file 'lisp/emacs-lisp/nadvice.el'
--- a/lisp/emacs-lisp/nadvice.el 2014-01-03 05:37:58 +0000
+++ b/lisp/emacs-lisp/nadvice.el 2014-02-02 02:25:05 +0000
@@ -67,6 +67,11 @@
(defsubst advice--cdr (f) (aref (aref f 2) 2))
(defsubst advice--props (f) (aref (aref f 2) 3))
+(defun advice--cd*r (f)
+ (while (advice--p f)
+ (setq f (advice--cdr f)))
+ f)
+
(defun advice--make-docstring (function)
"Build the raw docstring for FUNCTION, presumably advised."
(let ((flist (indirect-function function))
=== modified file 'lisp/help-fns.el'
--- a/lisp/help-fns.el 2014-01-07 20:40:44 +0000
+++ b/lisp/help-fns.el 2014-02-02 02:25:05 +0000
@@ -187,7 +187,7 @@
(let ((docbuf (get-buffer-create " *DOC*"))
(name (if (eq 'var kind)
(concat "V" (symbol-name subr-or-var))
- (concat "F" (subr-name subr-or-var)))))
+ (concat "F" (subr-name (advice--cd*r subr-or-var))))))
(with-current-buffer docbuf
(goto-char (point-min))
(if (eobp)
@@ -542,11 +542,7 @@
;; real definition, if that symbol is already set up.
(real-function
(or (and advised
- (let* ((advised-fn (advice--cdr
- (advice--symbol-function function))))
- (while (advice--p advised-fn)
- (setq advised-fn (advice--cdr advised-fn)))
- advised-fn))
+ (advice--cd*r (advice--symbol-function function)))
function))
;; Get the real definition.
(def (if (symbolp real-function)
@@ -660,9 +656,9 @@
(or doc "Not documented.")))))))
;; Add defaults to `help-fns-describe-function-functions'.
-(add-hook 'help-fns-describe-function-functions 'help-fns--obsolete)
-(add-hook 'help-fns-describe-function-functions 'help-fns--parent-mode)
-(add-hook 'help-fns-describe-function-functions 'help-fns--compiler-macro)
+(add-hook 'help-fns-describe-function-functions #'help-fns--obsolete)
+(add-hook 'help-fns-describe-function-functions #'help-fns--parent-mode)
+(add-hook 'help-fns-describe-function-functions #'help-fns--compiler-macro)
;; Variables
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116238: * lisp/help-fns.el (help-C-file-name): Handle advised functions.,
Stefan Monnier <=