Gnus development mailing list
 help / color / mirror / Atom feed
From: Raphael Kubo da Costa <kubito@gmail.com>
To: ding@gnus.org
Cc: tzz@lifelogs.com
Subject: [PATCH] auth-source.el: Also load EIEIO when byte-compiling.
Date: Wed, 16 Feb 2011 23:47:36 -0200	[thread overview]
Message-ID: <1297907256-17277-1-git-send-email-kubito@gmail.com> (raw)

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




             reply	other threads:[~2011-02-17  1:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17  1:47 Raphael Kubo da Costa [this message]
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

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=1297907256-17277-1-git-send-email-kubito@gmail.com \
    --to=kubito@gmail.com \
    --cc=ding@gnus.org \
    --cc=tzz@lifelogs.com \
    /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.
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).