aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorTino Calancha2016-07-09 22:56:25 +0900
committerTino Calancha2016-07-09 22:56:25 +0900
commitc3223dd505ba0ecde57371eae7e9a59637a852e4 (patch)
treec5d66cc5e4187d29b26a49a58c3aa8de70e21b07 /lisp
parentbfc29a5bcef1df4380a4f043f05035b88cd5c482 (diff)
downloademacs-c3223dd505ba0ecde57371eae7e9a59637a852e4.tar.gz
emacs-c3223dd505ba0ecde57371eae7e9a59637a852e4.zip
Detect aliases to built-in functions
* lisp/help-fns.el (describe-function-1): Check for aliases defined with (defalias alias (symbol-function built-in)) (Bug#23887). * test/lisp/help-fns-tests.el (help-fns-test-bug23887): Untag as failing this test.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/help-fns.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 9464c0b0d97..e4e23330e37 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -572,13 +572,17 @@ FILE is the file where FUNCTION was probably defined."
572 (aliased (or (symbolp def) 572 (aliased (or (symbolp def)
573 ;; Advised & aliased function. 573 ;; Advised & aliased function.
574 (and advised (symbolp real-function) 574 (and advised (symbolp real-function)
575 (not (eq 'autoload (car-safe def)))))) 575 (not (eq 'autoload (car-safe def))))
576 (and (subrp def)
577 (not (string= (subr-name def)
578 (symbol-name function))))))
576 (real-def (cond 579 (real-def (cond
577 (aliased (let ((f real-function)) 580 ((and aliased (not (subrp def)))
578 (while (and (fboundp f) 581 (let ((f real-function))
579 (symbolp (symbol-function f))) 582 (while (and (fboundp f)
580 (setq f (symbol-function f))) 583 (symbolp (symbol-function f)))
581 f)) 584 (setq f (symbol-function f)))
585 f))
582 ((subrp def) (intern (subr-name def))) 586 ((subrp def) (intern (subr-name def)))
583 (t def))) 587 (t def)))
584 (sig-key (if (subrp def) 588 (sig-key (if (subrp def)