tm / tm-setup.el

Diff from to

tm-setup.el

 
 ;;; @ for GNUS and Gnus
 ;;;
+;;Only load the Gnus parts of TM if Gnus version is < 5.8.0
 
-(if (featurep 'gnus)
-    (if (boundp 'gnus-load-hook)
-	(require 'gnus-mime)
-      (require 'tm-gnus)
-      )
-  ;; for GNUS
-  (defvar tm-setup/use-gnusutil nil)
+(if (featurep 'gnus) 
+    (progn
+      (eval-when-compile
+	(require 'gnus))
+      (if (< (gnus-continuum-version gnus-version) 5.08)
+	  (progn
+	    (if (boundp 'gnus-load-hook)
+		(require 'gnus-mime)
+	      (require 'tm-gnus))
+	    ;; for GNUS
+	    (defvar tm-setup/use-gnusutil nil)
   
-  (defun tm-setup/load-GNUS ()
-    (require 'tm-gnus)
-    )
+	    (defun tm-setup/load-GNUS ()
+	      (require 'tm-gnus))
   
-  (if (and (boundp 'MULE) tm-setup/use-gnusutil)
-      (progn
-	(add-hook 'gnus-Group-mode-hook (function gnusutil-initialize))
-	(add-hook 'gnus-group-mode-hook (function gnusutil-initialize))
-	(autoload 'gnusutil-initialize "gnusutil")
-	(autoload 'gnusutil-add-group "gnusutil")
-	(add-hook 'gnusutil-initialize-hook 'tm-setup/load-GNUS)
-	)
-    (add-hook 'gnus-Startup-hook 'tm-setup/load-GNUS 'append)
-    (add-hook 'gnus-startup-hook 'tm-setup/load-GNUS 'append)
-    )
+	    (if (and (boundp 'MULE) tm-setup/use-gnusutil)
+		(progn
+		  (add-hook 'gnus-Group-mode-hook (function gnusutil-initialize))
+		  (add-hook 'gnus-group-mode-hook (function gnusutil-initialize))
+		  (autoload 'gnusutil-initialize "gnusutil")
+		  (autoload 'gnusutil-add-group "gnusutil")
+		  (add-hook 'gnusutil-initialize-hook 'tm-setup/load-GNUS))
+	      (add-hook 'gnus-Startup-hook 'tm-setup/load-GNUS 'append)
+	      (add-hook 'gnus-startup-hook 'tm-setup/load-GNUS 'append))
+      
+	    ;; for Gnus
+	    (defun tm-setup/load-gnus ()
+	      (let (gnus-load-hook)
+		(remove-hook 'gnus-startup-hook 'tm-setup/load-GNUS)
+		(require 'gnus-mime)))
   
-  ;; for Gnus
-  (defun tm-setup/load-gnus ()
-    (let (gnus-load-hook)
-      (remove-hook 'gnus-startup-hook 'tm-setup/load-GNUS)
-      (require 'gnus-mime)
-      ))
-  
-  (add-hook 'gnus-load-hook 'tm-setup/load-gnus)
-  )
+	    (add-hook 'gnus-load-hook 'tm-setup/load-gnus)))))
 
 
 ;;; @ end
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.