From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68963 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Gnus and No Gnus Date: Mon, 07 Sep 2009 21:07:57 +0900 Organization: Emacsen advocacy group Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1252325314 6400 80.91.229.12 (7 Sep 2009 12:08:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Sep 2009 12:08:34 +0000 (UTC) Cc: ding@gnus.org, emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 07 14:08:27 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mkd1F-0006bm-BX for ged-emacs-devel@m.gmane.org; Mon, 07 Sep 2009 14:08:25 +0200 Original-Received: from localhost ([127.0.0.1]:36243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mkd1E-0008F5-OW for ged-emacs-devel@m.gmane.org; Mon, 07 Sep 2009 08:08:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mkd18-0008F0-4T for emacs-devel@gnu.org; Mon, 07 Sep 2009 08:08:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mkd12-0008Cz-ES for emacs-devel@gnu.org; Mon, 07 Sep 2009 08:08:16 -0400 Original-Received: from [199.232.76.173] (port=46652 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mkd12-0008Ci-39 for emacs-devel@gnu.org; Mon, 07 Sep 2009 08:08:12 -0400 Original-Received: from orlando.hostforweb.net ([216.246.45.90]:51845) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mkd0y-0004Dy-PA; Mon, 07 Sep 2009 08:08:09 -0400 Original-Received: from localhost ([127.0.0.1]:35013) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1Mkd0s-0004GO-GQ; Mon, 07 Sep 2009 07:08:03 -0500 X-Hashcash: 1:20:090907:rgm@gnu.org::WduDLlCM5v0b4Aq4:0000000cnC X-Hashcash: 1:20:090907:emacs-devel@gnu.org::9up91e8z7OoYnNZ0:0000000000000000000000000000000000000000000H6I X-Hashcash: 1:20:090907:ding@gnus.org::dwAVSPZlG0HSOQdN:00000kCZ X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:DuBDPiWBdLF4EX/KItRwwxLF9qg= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115083 gmane.emacs.gnus.general:68963 Archived-At: --=-=-= Hi, Today I tried synch'ing the Gnus trunk with the Emacs trunk and found a problem concerning `float-time'. In time-date.el, `define-obsolete-function-alias' is not available in Emacs 21 that Gnus still supports. It causes an error when loading gnus-load.el. In ecomplete.el, gnus-util.el and time-date.el, (featurep 'xemacs) is used for checking if `float-time' is available like this: (if (featurep 'xemacs) (time-to-seconds time) (float-time time)) However, XEmacs may implement `float-time' in the future. Therefore I made changes in those files as attached below. WDYT? The whole patch that synch the Gnus trunk with the Emacs trunk is: ftp://ftp.jpl.org/pub/tmp/Gnus-Emacs-20090907.diff.gz of http://www.jpl.org/ftp/pub/tmp/Gnus-Emacs-20090907.diff.gz Regards, --=-=-= Content-Type: text/x-patch Content-Disposition: inline *** lisp/calendar/time-date.el~ 2009-09-02 21:50:25 +0000 --- lisp/calendar/time-date.el 2009-09-07 11:55:15 +0000 *************** *** 114,130 **** ;; Bit of a mess. Emacs has float-time since at least 21.1. ;; This file is synced to Gnus, and XEmacs packages may have been written ;; using time-to-seconds from the Gnus library. ! ;;;###autoload(if (featurep 'xemacs) ! ;;;###autoload (autoload 'time-to-seconds "time-date") ! ;;;###autoload (define-obsolete-function-alias 'time-to-seconds 'float-time "21.1")) ! ! (if (featurep 'xemacs) ! (defun time-to-seconds (time) ! "Convert time value TIME to a floating point number." ! (with-decoded-time-value ((high low micro time)) ! (+ (* 1.0 high 65536) ! low ! (/ micro 1000000.0))))) ;;;###autoload (defun seconds-to-time (seconds) --- 114,132 ---- ;; Bit of a mess. Emacs has float-time since at least 21.1. ;; This file is synced to Gnus, and XEmacs packages may have been written ;; using time-to-seconds from the Gnus library. ! ;;;###autoload(if (fboundp 'float-time) ! ;;;###autoload (progn ! ;;;###autoload (defalias 'time-to-seconds 'float-time) ! ;;;###autoload (make-obsolete 'time-to-seconds 'float-time "21.1")) ! ;;;###autoload (autoload 'time-to-seconds "time-date")) ! ! (unless (fboundp 'float-time) ! (defun time-to-seconds (time) ! "Convert time value TIME to a floating point number." ! (with-decoded-time-value ((high low micro time)) ! (+ (* 1.0 high 65536) ! low ! (/ micro 1000000.0))))) ;;;###autoload (defun seconds-to-time (seconds) *************** *** 251,259 **** (defun time-to-number-of-days (time) "Return the number of days represented by TIME. The number of days will be returned as a floating point number." ! (/ (if (featurep 'xemacs) ! (time-to-seconds time) ! (float-time time)) (* 60 60 24))) ;;;###autoload (defun safe-date-to-time (date) --- 253,262 ---- (defun time-to-number-of-days (time) "Return the number of days represented by TIME. The number of days will be returned as a floating point number." ! (/ (if (fboundp 'float-time) ! (float-time time) ! (time-to-seconds time)) ! (* 60 60 24))) ;;;###autoload (defun safe-date-to-time (date) *** lisp/gnus/ecomplete.el~ 2009-09-02 21:50:26 +0000 --- lisp/gnus/ecomplete.el 2009-09-07 11:55:15 +0000 *************** *** 56,64 **** (defun ecomplete-add-item (type key text) (let ((elems (assq type ecomplete-database)) (now (string-to-number ! (format "%.0f" (if (featurep 'xemacs) ! (time-to-seconds (current-time)) ! (float-time))))) entry) (unless elems (push (setq elems (list type)) ecomplete-database)) --- 56,64 ---- (defun ecomplete-add-item (type key text) (let ((elems (assq type ecomplete-database)) (now (string-to-number ! (format "%.0f" (if (fboundp 'float-time) ! (float-time) ! (time-to-seconds (current-time)))))) entry) (unless elems (push (setq elems (list type)) ecomplete-database)) *** lisp/gnus/gnus-util.el~ 2009-09-02 21:50:26 +0000 --- lisp/gnus/gnus-util.el 2009-09-07 11:55:15 +0000 *************** *** 285,296 **** (and (= (car fdate) (car date)) (> (nth 1 fdate) (nth 1 date)))))) ! (defun gnus-float-time (&optional time) ! "Convert time value TIME to a floating point number. TIME defaults to the current time." ! (if (featurep 'xemacs) ! (time-to-seconds (or time (current-time))) ! (float-time time))) ;;; Keymap macros. --- 285,296 ---- (and (= (car fdate) (car date)) (> (nth 1 fdate) (nth 1 date)))))) ! (if (fboundp 'float-time) ! (defalias 'gnus-float-time 'float-time) ! (defun gnus-float-time (&optional time) ! "Convert time value TIME to a floating point number. TIME defaults to the current time." ! (time-to-seconds (or time (current-time))))) ;;; Keymap macros. --=-=-=--