]> code.delx.au - gnu-emacs/blobdiff - lisp/time.el
international/characters.el: Add category '|' (word breakable) to fullwidth characters.
[gnu-emacs] / lisp / time.el
index 965024bf7c2ed27f4996e03439e4a2fc620c9644..302a8c7cd737500998c23eae60b7f198bdfd0c68 100644 (file)
@@ -1,7 +1,7 @@
 ;;; time.el --- display time, load and mail indicator in mode line of Emacs -*-coding: utf-8 -*-
 
 ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1996, 2000, 2001, 2002,
-;;   2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;;   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 
@@ -65,7 +65,12 @@ directory `display-time-mail-directory' contains nonempty files."
 (defcustom display-time-default-load-average 0
   "Which load average value will be shown in the mode line.
 Almost every system can provide values of load for past 1 minute, past 5 or
-past 15 minutes.  The default is to display 1 minute load average."
+past 15 minutes.  The default is to display 1 minute load average.
+The value can be one of:
+
+  0   => 1 minute load
+  1   => 5 minutes load
+  2   => 15 minutes load"
   :type '(choice (const :tag "1 minute load" 0)
                 (const :tag "5 minutes load" 1)
                 (const :tag "15 minutes load" 2)
@@ -82,7 +87,7 @@ past 15 minutes.  The default is to display 1 minute load average."
 
 ;;;###autoload
 (defcustom display-time-day-and-date nil "\
-*Non-nil means \\[display-time] should display day and date as well as time."
+Non-nil means \\[display-time] should display day and date as well as time."
   :type 'boolean
   :group 'display-time)
 
@@ -100,6 +105,7 @@ A value of nil means 1 <= hh <= 12, and an AM/PM suffix is used."
   :group 'display-time)
 
 (defvar display-time-string nil)
+;;;###autoload(put 'display-time-string 'risky-local-variable t)
 
 (defcustom display-time-hook nil
   "List of functions to be called when the time is updated on the mode line."
@@ -176,7 +182,7 @@ LABEL is a string to display as the label of that TIMEZONE's time."
   :version "23.1")
 
 (defcustom display-time-world-buffer-name "*wclock*"
-  "Name of the wclock buffer."
+  "Name of the world clock buffer."
   :group 'display-time
   :type 'string
   :version "23.1")
@@ -197,7 +203,7 @@ LABEL is a string to display as the label of that TIMEZONE's time."
   (let ((map (make-sparse-keymap)))
     (define-key map "q" 'kill-this-buffer)
     map)
-  "Keymap of Display Time World mode")
+  "Keymap of Display Time World mode.")
 
 ;;;###autoload
 (defun display-time ()
@@ -554,9 +560,9 @@ For example, the Unix uptime command format is \"%D, %z%2h:%.2m\"."
   (interactive)
   (let ((str
          (format-seconds (or format "%Y, %D, %H, %M, %z%S")
-                         (time-to-seconds
+                         (float-time
                           (time-subtract (current-time) before-init-time)))))
-    (if (interactive-p)
+    (if (called-interactively-p 'interactive)
         (message "%s" str)
       str)))
 
@@ -566,9 +572,9 @@ For example, the Unix uptime command format is \"%D, %z%2h:%.2m\"."
   (interactive)
   (let ((str
         (format "%.1f seconds"
-                (time-to-seconds
+                (float-time
                  (time-subtract after-init-time before-init-time)))))
-    (if (interactive-p)
+    (if (called-interactively-p 'interactive)
         (message "%s" str)
       str)))