Update of /cvsroot/emacs-jabber/emacs-jabber
In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv14783
Modified Files:
jabber-activity.el
Log Message:
Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-456
Creator: Magnus Henoch <ma...@fr...>
Avoid recursive loading of jabber-activity
Reported by Tom Tromey.
Index: jabber-activity.el
===================================================================
RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-activity.el,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- jabber-activity.el 17 Feb 2008 18:09:26 -0000 1.32
+++ jabber-activity.el 21 Feb 2008 15:29:45 -0000 1.33
@@ -48,12 +48,17 @@
"activity tracking options"
:group 'jabber)
+;; All the (featurep 'jabber-activity) is so we don't call a function
+;; with an autoloaded cookie while the file is loading, since that
+;; would lead to endless load recursion.
+
(defcustom jabber-activity-make-string 'jabber-activity-make-string-default
"Function to call, for making the string to put in the mode
line. The default function returns the nick of the user."
:set #'(lambda (var val)
(custom-set-default var val)
- (when (fboundp 'jabber-activity-make-name-alist)
+ (when (and (featurep 'jabber-activity)
+ (fboundp 'jabber-activity-make-name-alist))
(jabber-activity-make-name-alist)
(jabber-activity-mode-line-update)))
:type 'function
@@ -70,7 +75,8 @@
JIDs."
:set #'(lambda (var val)
(custom-set-default var val)
- (when (fboundp 'jabber-activity-make-name-alist)
+ (when (and (featurep 'jabber-activity)
+ (fboundp 'jabber-activity-make-name-alist))
(jabber-activity-make-name-alist)
(jabber-activity-mode-line-update)))
:type '(choice (function-item :tag "Keep strings"
@@ -86,7 +92,8 @@
:group 'jabber-activity
:set #'(lambda (var val)
(custom-set-default var val)
- (when (bound-and-true-p jabber-activity-mode)
+ (when (and (featurep 'jabber-activity)
+ (bound-and-true-p jabber-activity-mode))
(jabber-activity-mode -1)
(jabber-activity-mode 1))))
@@ -97,7 +104,7 @@
:type 'sexp
:group 'jabber-activity
:set #'(lambda (var val)
- (if (not (bound-and-true-p jabber-activity-mode))
+ (if (not (and (featurep 'jabber-activity) (bound-and-true-p jabber-activity-mode)))
(custom-set-default var val)
(jabber-activity-mode -1)
(custom-set-default var val)
|