From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.devel Subject: an elint error message Date: Wed, 25 Nov 2009 10:09:24 +1100 Organization: Bah Humbug Message-ID: <874ooj4j17.fsf@blah.blah> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1259104214 31769 80.91.229.12 (24 Nov 2009 23:10:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Nov 2009 23:10:14 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 25 00:10:07 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ND4WM-00004t-0f for ged-emacs-devel@m.gmane.org; Wed, 25 Nov 2009 00:10:06 +0100 Original-Received: from localhost ([127.0.0.1]:36636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ND4WL-00059X-RQ for ged-emacs-devel@m.gmane.org; Tue, 24 Nov 2009 18:10:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ND4Vu-0004uX-5m for emacs-devel@gnu.org; Tue, 24 Nov 2009 18:09:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ND4Vp-0004r5-0M for emacs-devel@gnu.org; Tue, 24 Nov 2009 18:09:37 -0500 Original-Received: from [199.232.76.173] (port=35223 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ND4Vo-0004qu-RB for emacs-devel@gnu.org; Tue, 24 Nov 2009 18:09:32 -0500 Original-Received: from mailout1-1.pacific.net.au ([61.8.2.208]:35018 helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ND4Vo-0002mc-AW for emacs-devel@gnu.org; Tue, 24 Nov 2009 18:09:32 -0500 Original-Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 40616510D74 for ; Wed, 25 Nov 2009 10:09:28 +1100 (EST) Original-Received: from blah.blah (ppp291C.dyn.pacific.net.au [61.8.41.28]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 8C47D8C1F for ; Wed, 25 Nov 2009 10:09:27 +1100 (EST) Original-Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1ND4Vg-0000uw-7z for emacs-devel@gnu.org; Wed, 25 Nov 2009 10:09:24 +1100 User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:117717 Archived-At: --=-=-= 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 ... --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=elint.el.error-message.diff 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 --=-=-=--