bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#16725: 24.3.50; (wrong-type-argument stringp t) with `apropos-docume


From: Drew Adams
Subject: bug#16725: 24.3.50; (wrong-type-argument stringp t) with `apropos-documentation'
Date: Tue, 11 Feb 2014 14:34:50 -0800 (PST)

Yes, this normally will not happen.  But the code is unnecessarily
fragile, and here is a simple case that breaks it.

I had this mistaken autoload sexp in a startup file:

(autoload 'insert-time-string "insert-time-string" t 
          "Insert current time at point.")

(The last two args are swapped.)

I have `apropos-do-all' = t.

I did `M-x apropos-documentation RET empty list RET
And I got the error message.

This fragile code, in `apropos-documentation' is the cause:

          (if do-all
              (mapatoms
               (lambda (symbol)
                 (setq f (apropos-safe-documentation symbol))
                 (setq v (get symbol 'variable-documentation))
                 (if (integerp v) (setq v))
                 (setq f (apropos-documentation-internal f)
                       v (apropos-documentation-internal v))

The return value of `apropos-safe-cocumentation' for symbol
`insert-time-string' is `t'.   And that causes
`apropos-documentation-internal' to raise the error.

To improve the code, test the values of `f' and `v' before passing them
to `apropos-documentation-internal', or make that function itself
failsafe for a non-string arg.

BTW, this same error exists as far back as Emacs 20!


In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2014-02-06 on ODIEONE
Bzr revision: 116299 rgm@gnu.org-20140207032552-3ycw6hai2zl7yynq
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 'CFLAGS=-O0 -g3' LDFLAGS=-Lc:/Devel/emacs/lib
 CPPFLAGS=-Ic:/Devel/emacs/include'





reply via email to

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