From: Kevin Ryde <user42@zip.com.au>
To: emacs-devel@gnu.org
Subject: an elint error message
Date: Wed, 25 Nov 2009 10:09:24 +1100 [thread overview]
Message-ID: <874ooj4j17.fsf@blah.blah> (raw)
[-- Attachment #1: Type: text/plain, Size: 534 bytes --]
I applied this to an elint error message. I was a bit confused by
"Unable to find require'd library" until realizing it wanted the source,
where I only had the .elc. I think I struck other errors from some of
my macro expansions or something which I can't reproduce any more, but
using error-message-string lets it show whatever went wrong.
You'd be tempted to make it a display-warning or in the elint report
buffer, instead of just a `message', so as not to lose it among other
chattering. But that can be for another time ...
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: elint.el.error-message.diff --]
[-- Type: text/x-diff, Size: 1070 bytes --]
Index: elint.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/elint.el,v
retrieving revision 1.34
diff -u -u -r1.34 elint.el
--- elint.el 14 Nov 2009 19:57:12 -0000 1.34
+++ elint.el 24 Nov 2009 23:06:06 -0000
@@ -493,7 +493,7 @@
(defun elint-add-required-env (env name file)
"Augment ENV with the variables defined by feature NAME in FILE."
- (condition-case nil
+ (condition-case err
(let* ((libname (if (stringp file)
file
(symbol-name name)))
@@ -518,9 +518,10 @@
;;; (elint-update-env))
;;; (setq env (elint-env-add-env env elint-buffer-env))))
;;(message "Elint processed (require '%s)" name))
- (error "Unable to find require'd library %s" name)))
+ (error "%s.el not found in load-path" libname)))
(error
- (message "Can't get variables from require'd library %s" name)))
+ (message "Can't get variables from require'd library %s: %s"
+ name (error-message-string err))))
env)
(defvar elint-top-form nil
reply other threads:[~2009-11-24 23:09 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=874ooj4j17.fsf@blah.blah \
--to=user42@zip.com.au \
--cc=emacs-devel@gnu.org \
/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.