diff options
| author | Glenn Morris | 2014-05-05 17:33:07 -0400 |
|---|---|---|
| committer | Glenn Morris | 2014-05-05 17:33:07 -0400 |
| commit | 6da8d069757fd26ee537704a9f0dea24dc5e00b8 (patch) | |
| tree | ced4c72417f00aac34d6e40a8da67cfe07acf1ef /lisp | |
| parent | e6025d7240197bfd47cf649c5976533da6869a6e (diff) | |
| download | emacs-6da8d069757fd26ee537704a9f0dea24dc5e00b8.tar.gz emacs-6da8d069757fd26ee537704a9f0dea24dc5e00b8.zip | |
* lisp/help-fns.el (describe-function-1): Test for an autoload before a macro
since `macrop' works on autoloads.
* test/automated/help-fns.el: New file.
Fixes: debbugs:17410
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/help-fns.el | 13 |
2 files changed, 11 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9b21fd8cd66..3bbacb85e97 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-05-05 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * help-fns.el (describe-function-1): Test for an autoload before a | ||
| 4 | macro, since `macrop' works on autoloads. (Bug#17410) | ||
| 5 | |||
| 1 | 2014-05-05 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2014-05-05 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * electric.el (electric-indent-functions-without-reindent): Add yaml. | 8 | * electric.el (electric-indent-functions-without-reindent): Add yaml. |
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index a186254123d..5b0739ed9ae 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; help-fns.el --- Complex help functions -*- lexical-binding: t -*- | 1 | ;;; help-fns.el --- Complex help functions -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985-1986, 1993-1994, 1998-2014 Free Software | 3 | ;; Copyright (C) 1985-1986, 1993-1994, 1998-2014 Free Software Foundation, Inc. |
| 4 | ;; Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Maintainer: emacs-devel@gnu.org | 5 | ;; Maintainer: emacs-devel@gnu.org |
| 7 | ;; Keywords: help, internal | 6 | ;; Keywords: help, internal |
| @@ -479,6 +478,11 @@ FILE is the file where FUNCTION was probably defined." | |||
| 479 | ;; aliases before functions. | 478 | ;; aliases before functions. |
| 480 | (aliased | 479 | (aliased |
| 481 | (format "an alias for `%s'" real-def)) | 480 | (format "an alias for `%s'" real-def)) |
| 481 | ((autoloadp def) | ||
| 482 | (format "%s autoloaded %s" | ||
| 483 | (if (commandp def) "an interactive" "an") | ||
| 484 | (if (eq (nth 4 def) 'keymap) "keymap" | ||
| 485 | (if (nth 4 def) "Lisp macro" "Lisp function")))) | ||
| 482 | ((or (eq (car-safe def) 'macro) | 486 | ((or (eq (car-safe def) 'macro) |
| 483 | ;; For advised macros, def is a lambda | 487 | ;; For advised macros, def is a lambda |
| 484 | ;; expression or a byte-code-function-p, so we | 488 | ;; expression or a byte-code-function-p, so we |
| @@ -491,11 +495,6 @@ FILE is the file where FUNCTION was probably defined." | |||
| 491 | (concat beg "Lisp function")) | 495 | (concat beg "Lisp function")) |
| 492 | ((eq (car-safe def) 'closure) | 496 | ((eq (car-safe def) 'closure) |
| 493 | (concat beg "Lisp closure")) | 497 | (concat beg "Lisp closure")) |
| 494 | ((autoloadp def) | ||
| 495 | (format "%s autoloaded %s" | ||
| 496 | (if (commandp def) "an interactive" "an") | ||
| 497 | (if (eq (nth 4 def) 'keymap) "keymap" | ||
| 498 | (if (nth 4 def) "Lisp macro" "Lisp function")))) | ||
| 499 | ((keymapp def) | 498 | ((keymapp def) |
| 500 | (let ((is-full nil) | 499 | (let ((is-full nil) |
| 501 | (elts (cdr-safe def))) | 500 | (elts (cdr-safe def))) |