[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
apropos aborts too easily
From: |
David Byers |
Subject: |
apropos aborts too easily |
Date: |
31 Dec 2002 21:43:28 +0100 |
In GNU Emacs 21.2.2 (i386-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2002-10-16 on raven, modified by Debian
configured using `configure i386-linux --prefix=/usr
--sharedstatedir=/var/lib --libexecdir=/usr/lib
--localstatedir=/var/lib --infodir=/usr/share/info
--mandir=/usr/share/man --with-pop=yes --with-x=yes
--with-x-toolkit=athena --without-gif'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: en_US
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US
locale-coding-system: iso-latin-1
default-enable-multibyte-characters: t
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
M-x apropos aborts when there is an error in the documentation file.
Typically the error message is something along the lines of "Invalid
data in documentation file -- ^A followed by code 0134".
This seems to happen when I recompile an elisp file without reloading
it, something I do frequently when developing elisp code.
I think if would be better if the error message was placed in the
apropos buffer and did not cause apropos to abort.
The patch I use is below. It does not print the specific error message
in the apropos buffer; it just prints a message saying there was an
error, regardless of what error it was, which is good enough for me.
--- /usr/share/emacs/21.2/lisp/apropos.el 2001-10-22 03:25:59.000000000 +0200
+++ apropos-patched.el 2002-12-31 21:34:04.000000000 +0100
@@ -235,37 +235,46 @@
(if (setq doc (condition-case nil
(documentation symbol t)
(void-function
- "(alias for undefined function)")))
+ "(alias for undefined function)")
+ (error "(error retrieving function
documentation)")))
(substring doc 0 (string-match "\n" doc))
"(not documented)"))
(when (boundp symbol)
- (if (setq doc (documentation-property
- symbol 'variable-documentation t))
- (substring doc 0 (string-match "\n" doc))
- "(not documented)"))
+ (condition-case nil
+ (if (setq doc (documentation-property
+ symbol 'variable-documentation t))
+ (substring doc 0 (string-match "\n" doc))
+ "(not documented)")
+ (error "(error retrieving variable documentation)")))
(when (setq properties (symbol-plist symbol))
(setq doc (list (car properties)))
(while (setq properties (cdr (cdr properties)))
(setq doc (cons (car properties) doc)))
(mapconcat #'symbol-name (nreverse doc) " "))
(when (get symbol 'widget-type)
- (if (setq doc (documentation-property
- symbol 'widget-documentation t))
- (substring doc 0
- (string-match "\n" doc))
- "(not documented)"))
+ (condition-case nil
+ (if (setq doc (documentation-property
+ symbol 'widget-documentation t))
+ (substring doc 0
+ (string-match "\n" doc))
+ "(not documented)")
+ (error "(error retrieving widget documentation)")))
(when (facep symbol)
- (if (setq doc (documentation-property
- symbol 'face-documentation t))
- (substring doc 0
- (string-match "\n" doc))
- "(not documented)"))
+ (condition-case nil
+ (if (setq doc (documentation-property
+ symbol 'face-documentation t))
+ (substring doc 0
+ (string-match "\n" doc))
+ "(not documented)")
+ (error "(error retrieving face documentation)")))
(when (get symbol 'custom-group)
- (if (setq doc (documentation-property
- symbol 'group-documentation t))
- (substring doc 0
- (string-match "\n" doc))
- "(not documented)"))))
+ (condition-case nil
+ (if (setq doc (documentation-property
+ symbol 'group-documentation t))
+ (substring doc 0
+ (string-match "\n" doc))
+ "(not documented)")
+ (error "(error retrieveing custom-group
documentation)")))))
(setq p (cdr p))))
(apropos-print
(or do-all apropos-do-all)
--
David Byers.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- apropos aborts too easily,
David Byers <=