diff options
| author | Tino Calancha | 2016-07-09 22:56:25 +0900 |
|---|---|---|
| committer | Tino Calancha | 2016-07-09 22:56:25 +0900 |
| commit | c3223dd505ba0ecde57371eae7e9a59637a852e4 (patch) | |
| tree | c5d66cc5e4187d29b26a49a58c3aa8de70e21b07 /lisp | |
| parent | bfc29a5bcef1df4380a4f043f05035b88cd5c482 (diff) | |
| download | emacs-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.el | 16 |
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) |