;;; 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
(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)
;;;###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)
: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."
: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")
(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 ()
(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)))
(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)))