changeset 104797:cfe03355665f

(time-add): Suppress warnings from compat function.
author Glenn Morris <rgm@gnu.org>
date Wed, 02 Sep 2009 03:22:00 +0000
parents e9f8f2b78f10
children b04b1ea82ee0
files lisp/net/newst-backend.el
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/net/newst-backend.el	Wed Sep 02 03:21:26 2009 +0000
+++ b/lisp/net/newst-backend.el	Wed Sep 02 03:22:00 2009 +0000
@@ -442,10 +442,15 @@
 ;; ======================================================================
 ;;; Compatibility section, XEmacs, Emacs
 ;; ======================================================================
+
+;; FIXME It is bad practice to define compat functions with such generic names.
+
+;; This is not needed in Emacs >= 22.1.
 (unless (fboundp 'time-add)
   (require 'time-date);;FIXME
   (defun time-add (t1 t2)
-    (seconds-to-time (+ (time-to-seconds t1) (time-to-seconds t2)))))
+    (with-no-warnings ; don't warn about obsolete time-to-seconds in 23.2
+      (seconds-to-time (+ (time-to-seconds t1) (time-to-seconds t2))))))
 
 (unless (fboundp 'match-string-no-properties)
   (defalias 'match-string-no-properties 'match-string))