Commit 6da8d069 authored by Glenn Morris's avatar Glenn Morris

* 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
parent e6025d72
2014-05-05 Glenn Morris <rgm@gnu.org>
* help-fns.el (describe-function-1): Test for an autoload before a
macro, since `macrop' works on autoloads. (Bug#17410)
2014-05-05 Stefan Monnier <monnier@iro.umontreal.ca>
* electric.el (electric-indent-functions-without-reindent): Add yaml.
......
;;; help-fns.el --- Complex help functions -*- lexical-binding: t -*-
;; Copyright (C) 1985-1986, 1993-1994, 1998-2014 Free Software
;; Foundation, Inc.
;; Copyright (C) 1985-1986, 1993-1994, 1998-2014 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: help, internal
......@@ -479,6 +478,11 @@ FILE is the file where FUNCTION was probably defined."
;; aliases before functions.
(aliased
(format "an alias for `%s'" real-def))
((autoloadp def)
(format "%s autoloaded %s"
(if (commandp def) "an interactive" "an")
(if (eq (nth 4 def) 'keymap) "keymap"
(if (nth 4 def) "Lisp macro" "Lisp function"))))
((or (eq (car-safe def) 'macro)
;; For advised macros, def is a lambda
;; expression or a byte-code-function-p, so we
......@@ -491,11 +495,6 @@ FILE is the file where FUNCTION was probably defined."
(concat beg "Lisp function"))
((eq (car-safe def) 'closure)
(concat beg "Lisp closure"))
((autoloadp def)
(format "%s autoloaded %s"
(if (commandp def) "an interactive" "an")
(if (eq (nth 4 def) 'keymap) "keymap"
(if (nth 4 def) "Lisp macro" "Lisp function"))))
((keymapp def)
(let ((is-full nil)
(elts (cdr-safe def)))
......
2014-05-05 Glenn Morris <rgm@gnu.org>
* automated/help-fns.el: New file.
2014-04-25 Michael Albinus <michael.albinus@gmx.de>
* automated/tramp-tests.el (top):
......
;;; help-fns.el --- tests for help-fns.el
;; Copyright (C) 2014 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Code:
(require 'ert)
(autoload 'help-fns-test--macro "help-fns" nil nil t)
(ert-deftest help-fns-test-bug17410 ()
"Test for http://debbugs.gnu.org/17410 ."
(describe-function 'help-fns-test--macro)
(with-current-buffer "*Help*"
(goto-char (point-min))
(should (search-forward "autoloaded Lisp macro" (line-end-position)))))
;;; help-fns.el ends here
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment