mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-25 07:28:20 +00:00
* 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
This commit is contained in:
parent
e6025d7240
commit
6da8d06975
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
@ -1,7 +1,6 @@
|
||||
;;; 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)))
|
||||
|
@ -1,3 +1,7 @@
|
||||
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):
|
||||
|
37
test/automated/help-fns.el
Normal file
37
test/automated/help-fns.el
Normal file
@ -0,0 +1,37 @@
|
||||
;;; 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
|
Loading…
Reference in New Issue
Block a user