Commit 6ecab45e authored by Glenn Morris's avatar Glenn Morris

Update copyright.

(diary, diary-entry-time): Doc change.
(list-diary-entries): Doc change.  Trivial logic change.
(fancy-diary-display): Restore make-face command mistakenly
deleted 2003-05-08.
(show-all-diary-entries): Allow to pop-up frame if needed.
parent 8d638c1b
;;; diary-lib.el --- diary functions
;; Copyright (C) 1989, 1990, 1992, 1993, 1994, 1995, 2003
;; Copyright (C) 1989, 1990, 1992, 1993, 1994, 1995, 2003, 2004
;; Free Software Foundation, Inc.
;; Author: Edward M. Reingold <>
......@@ -52,8 +52,8 @@ If so, return the expanded file name, otherwise signal an error."
(defun diary (&optional arg)
"Generate the diary window for ARG days starting with the current date.
If no argument is provided, the number of days of diary entries is governed
by the variable `number-of-diary-entries'. This function is suitable for
execution in a `.emacs' file."
by the variable `number-of-diary-entries'. A value of ARG less than 1
does nothing. This function is suitable for execution in a `.emacs' file."
(interactive "P")
(let ((date (calendar-current-date)))
......@@ -284,7 +284,7 @@ Only used if `diary-header-line-flag' is non-nil."
"Create and display a buffer containing the relevant lines in diary-file.
The arguments are DATE and NUMBER; the entries selected are those
for NUMBER days starting with date DATE. The other entries are hidden
using selective display.
using selective display. If NUMBER is less than 1, this function does nothing.
Returns a list of all relevant diary entries found, if any, in order by date.
The list entries have the form ((month day year) string specifier) where
......@@ -314,7 +314,7 @@ These hooks have the following distinct roles:
`diary-hook' is run last. This can be used for an appointment
notification function."
(if (< 0 number)
(when (> number 0)
(let ((original-date date);; save for possible use in the hooks
......@@ -635,10 +635,10 @@ This function is provided for optional use as the `diary-display-hook'."
(symbol-name sym)))
(faceinfo marks))
(make-face temp-face)
;; Remove :face info from the marks,
;; copy the face info into temp-face
(setq faceinfo marks)
(while (setq faceinfo (memq :face faceinfo))
(copy-face (read (nth 1 faceinfo)) temp-face)
(setcar faceinfo nil)
......@@ -715,7 +715,8 @@ This function gets rid of the selective display of the diary file so that
all entries, not just some, are visible. If there is no diary buffer, one
is created."
(let ((d-file (diary-check-diary-file)))
(let ((d-file (diary-check-diary-file))
(pop-up-frames (window-dedicated-p (selected-window))))
(set-buffer (or (find-buffer-visiting d-file)
(find-file-noselect d-file t)))
......@@ -1100,8 +1101,8 @@ For example, returns 1325 for 1:25pm.
Returns `diary-unknown-time' (default value -9999) if no time is recognized.
The recognized forms are XXXX, X:XX, or XX:XX (military time), and XXam,
XXAM, XXpm, XXPM, XX:XXam, XX:XXAM XX:XXpm, or XX:XXPM. We also try to
accept time in the form XX[.XX][am/pm/AM/PM]]."
XXAM, XXpm, XXPM, XX:XXam, XX:XXAM XX:XXpm, or XX:XXPM. A period (.) can
be used instead of a colon (:) to separate the hour and minute parts."
(let ((case-fold-search nil))
(cond ((string-match ; Military time
"\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.]?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment