[Top][All Lists]

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

an elint error message

From: Kevin Ryde
Subject: an elint error message
Date: Wed, 25 Nov 2009 10:09:24 +1100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

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 ...

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)
                        (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)))
-     (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))))
 (defvar elint-top-form nil

reply via email to

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