Gnus development mailing list
 help / color / mirror / Atom feed
* [PATCH] auth-source.el: Also load EIEIO when byte-compiling.
@ 2011-02-17  1:47 Raphael Kubo da Costa
  2011-02-17  2:59 ` Katsumi Yamaoka
  0 siblings, 1 reply; 8+ messages in thread
From: Raphael Kubo da Costa @ 2011-02-17  1:47 UTC (permalink / raw)
  To: ding; +Cc: tzz

Commit 4a0aa92 moved (require 'eieio) to an `or', and the
byte-compiler only loads top-level `require' calls, which resulted in
problems when the byte-compiler tried to evaluate the `defclass'
macro.

The fallback loading code has also been changed -- there was a single
condition being checked, and if it evaluated to t the `load' call was
always made.
---
 lisp/ChangeLog      |    6 ++++++
 lisp/auth-source.el |   12 ++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 61538e2..3b17570 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2011-02-16  Raphael Kubo da Costa  <kubito@gmail.com>
+
+	* auth-source.el: Correctly load EIEIO from "gnus-fallback-lib/eieio"
+	as EIEIO must also be loaded when auth-source.el is being
+	byte-compiled.
+
 2011-02-16  Teodor Zlatanov  <tzz@lifelogs.com>
 
 	* gnus-fallback-lib/eieio/eieio.el: Copy from Emacs.
diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index abcc85b..3841e58 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -44,12 +44,12 @@
 (require 'netrc)
 (require 'assoc)
 (eval-when-compile (require 'cl))
-(ignore-errors
-  (or (require 'eieio))
-  ;; gnus-fallback-lib/ from gnus/lisp/gnus-fallback-lib
-  (load "gnus-fallback-lib/eieio/eieio"))
-(unless (featurep 'eieio)
-  (error "eieio not found in `load-path' or gnus-fallback-lib/ directory."))
+(eval-and-compile
+  (or (require 'eieio nil t)
+      ;; gnus-fallback-lib/ from gnus/lisp/gnus-fallback-lib
+      (load "gnus-fallback-lib/eieio/eieio"))
+  (unless (featurep 'eieio)
+    (error "eieio not found in `load-path' or gnus-fallback-lib/ directory.")))
 
 (autoload 'secrets-create-item "secrets")
 (autoload 'secrets-delete-item "secrets")
-- 
1.7.3.5




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-02-17 17:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-17  1:47 [PATCH] auth-source.el: Also load EIEIO when byte-compiling Raphael Kubo da Costa
2011-02-17  2:59 ` Katsumi Yamaoka
2011-02-17  3:05   ` Raphael Kubo da Costa
2011-02-17  3:55     ` Katsumi Yamaoka
2011-02-17  4:34       ` Raphael Kubo da Costa
2011-02-17  5:00         ` Katsumi Yamaoka
2011-02-17 17:02           ` Ted Zlatanov
2011-02-17  3:22   ` Ted Zlatanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).