From: David Byers <davby@ida.liu.se>
Subject: apropos aborts too easily
Date: 31 Dec 2002 21:43:28 +0100 [thread overview]
Message-ID: <41hectly1b.fsf@gedrix.ida.liu.se> (raw)
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.
reply other threads:[~2002-12-31 20:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41hectly1b.fsf@gedrix.ida.liu.se \
--to=davby@ida.liu.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.