diff lisp/gnus/gnus-util.el @ 30:ec9a17fef872 r19-15b98

Import from CVS: tag r19-15b98
author cvs
date Mon, 13 Aug 2007 08:52:29 +0200
parents 1917ad0d78d7
children e04119814345
line wrap: on
line diff
--- a/lisp/gnus/gnus-util.el	Mon Aug 13 08:51:58 2007 +0200
+++ b/lisp/gnus/gnus-util.el	Mon Aug 13 08:52:29 2007 +0200
@@ -36,6 +36,9 @@
 (require 'timezone)
 (require 'message)
 
+(eval-and-compile
+  (autoload 'nnmail-date-to-time "nnmail"))
+
 (defun gnus-boundp (variable)
   "Return non-nil if VARIABLE is bound and non-nil."
   (and (boundp variable)
@@ -142,7 +145,7 @@
 (defun gnus-byte-code (func)
   "Return a form that can be `eval'ed based on FUNC."
   (let ((fval (symbol-function func)))
-    (if (byte-code-function-p fval)
+    (if (compiled-function-p fval)
 	(let ((flist (append fval nil)))
 	  (setcar flist 'byte-code)
 	  flist)
@@ -317,7 +320,7 @@
 
 (defun gnus-completing-read (default prompt &rest args)
   ;; Like `completing-read', except that DEFAULT is the default argument.
-  (let* ((prompt (if default 
+  (let* ((prompt (if default
 		     (concat prompt " (default " default ") ")
 		   (concat prompt " ")))
 	 (answer (apply 'completing-read prompt args)))
@@ -372,7 +375,7 @@
 (defsubst gnus-time-iso8601 (time)
   "Return a string of TIME in YYMMDDTHHMMSS format."
   (format-time-string "%Y%m%dT%H%M%S" time))
-  
+
 (defun gnus-date-iso8601 (header)
   "Convert the date field in HEADER to YYMMDDTHHMMSS"
   (condition-case ()
@@ -478,7 +481,7 @@
       (goto-char orig)
       ;; Scroll horizontally to center (sort of) the point.
       (if (> max (window-width))
-	  (set-window-hscroll 
+	  (set-window-hscroll
 	   (get-buffer-window (current-buffer) t)
 	   (min (- (current-column) (/ (window-width) 3))
 		(+ 2 (- max (window-width)))))
@@ -496,8 +499,8 @@
 Timezone package is used."
   (condition-case ()
       (progn
-	(setq date (inline (timezone-fix-time 
-			    date nil 
+	(setq date (inline (timezone-fix-time
+			    date nil
 			    (aref (inline (timezone-parse-date date)) 4))))
 	(inline
 	  (timezone-make-sortable-date
@@ -506,7 +509,7 @@
 	     (timezone-make-time-string
 	      (aref date 3) (aref date 4) (aref date 5))))))
     (error "")))
-  
+
 (defun gnus-copy-file (file &optional to)
   "Copy FILE to TO."
   (interactive
@@ -549,7 +552,7 @@
 
 (defun gnus-make-sort-function (funs)
   "Return a composite sort condition based on the functions in FUNC."
-  (cond 
+  (cond
    ((not (listp funs)) funs)
    ((null funs) funs)
    ((cdr funs)
@@ -704,6 +707,7 @@
 
 ;;; Functions for saving to babyl/mail files.
 
+(defvar rmail-default-rmail-file)
 (defun gnus-output-to-rmail (filename &optional ask)
   "Append the current article to an Rmail file named FILENAME."
   (require 'rmail)