emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r117062: * lisp/help-fns.el (describe-function-1)


From: Glenn Morris
Subject: [Emacs-diffs] emacs-24 r117062: * lisp/help-fns.el (describe-function-1): Test for an autoload before a macro
Date: Mon, 05 May 2014 21:33:11 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117062
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17410
committer: Glenn Morris <address@hidden>
branch nick: emacs-24
timestamp: Mon 2014-05-05 17:33:07 -0400
message:
  * 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.
added:
  test/automated/help-fns.el     helpfns.el-20140505213058-j3jaib82defoczzx-1
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/help-fns.el               helpfns.el-20091113204419-o5vbwnq5f7feedwu-2354
  test/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-8588
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-05-05 19:04:40 +0000
+++ b/lisp/ChangeLog    2014-05-05 21:33:07 +0000
@@ -1,3 +1,8 @@
+2014-05-05  Glenn Morris  <address@hidden>
+
+       * 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  <address@hidden>
 
        * electric.el (electric-indent-functions-without-reindent): Add yaml.

=== modified file 'lisp/help-fns.el'
--- a/lisp/help-fns.el  2014-03-14 00:32:41 +0000
+++ b/lisp/help-fns.el  2014-05-05 21:33:07 +0000
@@ -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: address@hidden
 ;; Keywords: help, internal
@@ -479,6 +478,11 @@
                 ;; 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 @@
                  (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)))

=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2014-04-25 10:35:01 +0000
+++ b/test/ChangeLog    2014-05-05 21:33:07 +0000
@@ -1,3 +1,7 @@
+2014-05-05  Glenn Morris  <address@hidden>
+
+       * automated/help-fns.el: New file.
+
 2014-04-25  Michael Albinus  <address@hidden>
 
        * automated/tramp-tests.el (top):

=== added file 'test/automated/help-fns.el'
--- a/test/automated/help-fns.el        1970-01-01 00:00:00 +0000
+++ b/test/automated/help-fns.el        2014-05-05 21:33:07 +0000
@@ -0,0 +1,37 @@
+;;; help-fns.el --- tests for help-fns.el
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Maintainer: address@hidden
+
+;; 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]