aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2004-01-11 22:26:46 +0000
committerGlenn Morris2004-01-11 22:26:46 +0000
commit1293540e11dbbc334aad99532923e08f392baf61 (patch)
treed1e90d54fc7ef5204fee67d4efcb913bce7c5f4e
parent091f692060c43ab58e611776702e08fb576e7a97 (diff)
downloademacs-1293540e11dbbc334aad99532923e08f392baf61.tar.gz
emacs-1293540e11dbbc334aad99532923e08f392baf61.zip
Update copyright.
(view-diary-entries-initially, european-calendar-style): Doc change. (calendar-setup): Make defcustom rather than defvar. (mark-visible-calendar-date): Initialize temp-face and faceinfo in let binding so local to function.
-rw-r--r--lisp/calendar/calendar.el47
1 files changed, 29 insertions, 18 deletions
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 8f5985ddaab..7440a5c7e02 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1,7 +1,7 @@
1;;; calendar.el --- calendar functions 1;;; calendar.el --- calendar functions
2 2
3;; Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997, 3;; Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997,
4;; 2000, 2001, 2003 Free Software Foundation, Inc. 4;; 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
5 5
6;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> 6;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
7;; Keywords: calendar 7;; Keywords: calendar
@@ -154,10 +154,11 @@ the screen."
154 154
155;;;###autoload 155;;;###autoload
156(defcustom view-diary-entries-initially nil 156(defcustom view-diary-entries-initially nil
157 "*Non-nil means display current date's diary entries on entry. 157 "*Non-nil means display current date's diary entries on entry to calendar.
158The diary is displayed in another window when the calendar is first displayed, 158The diary is displayed in another window when the calendar is first displayed,
159if the current date is visible. The number of days of diary entries displayed 159if the current date is visible. The number of days of diary entries displayed
160is governed by the variable `number-of-diary-entries'." 160is governed by the variable `number-of-diary-entries'. This variable can
161be overridden by the value of `calendar-setup'."
161 :type 'boolean 162 :type 'boolean
162 :group 'diary) 163 :group 'diary)
163 164
@@ -573,7 +574,10 @@ are
573 574
574Names can be capitalized or not, written in full (as specified by the 575Names can be capitalized or not, written in full (as specified by the
575variable `calendar-day-name-array'), or abbreviated (as specified by 576variable `calendar-day-name-array'), or abbreviated (as specified by
576`calendar-day-abbrev-array') with or without a period." 577`calendar-day-abbrev-array') with or without a period. To take effect,
578this variable should be set before the calendar package and its associates
579are loaded. Otherwise, use one of the functions `european-calendar' or
580`american-calendar' to force the appropriate update."
577 :type 'boolean 581 :type 'boolean
578 :group 'diary) 582 :group 'diary)
579 583
@@ -1445,12 +1449,19 @@ return negative results."
1445 "Start calendar and diary in separate, dedicated frames.") 1449 "Start calendar and diary in separate, dedicated frames.")
1446 1450
1447;;;###autoload 1451;;;###autoload
1448(defvar calendar-setup nil 1452(defcustom calendar-setup nil
1449 "The frame set up of the calendar. 1453 "The frame setup of the calendar.
1450The choices are `one-frame' (calendar and diary together in one separate, 1454The choices are: `one-frame' (calendar and diary together in one separate,
1451dedicated frame), `two-frames' (calendar and diary in separate, dedicated 1455dedicated frame); `two-frames' (calendar and diary in separate, dedicated
1452frames), `calendar-only' (calendar in a separate, dedicated frame); with 1456frames); `calendar-only' (calendar in a separate, dedicated frame); with
1453any other value the current frame is used.") 1457any other value the current frame is used. Using any of the first
1458three options overrides the value of `view-diary-entries-initially'."
1459 :type '(choice
1460 (const :tag "calendar and diary in separate frame" one-frame)
1461 (const :tag "calendar and diary each in own frame" two-frames)
1462 (const :tag "calendar in separate frame" calendar-only)
1463 (const :tag "use current frame" nil))
1464 :group 'calendar)
1454 1465
1455;;;###autoload 1466;;;###autoload
1456(defun calendar (&optional arg) 1467(defun calendar (&optional arg)
@@ -2746,16 +2757,16 @@ MARK defaults to `diary-entry-marker'."
2746 (delete-char 1) 2757 (delete-char 1)
2747 (insert mark) 2758 (insert mark)
2748 (forward-char -2)) 2759 (forward-char -2))
2749 (progn ; attr list 2760 (let ; attr list
2750 (setq temp-face 2761 ((temp-face
2751 (make-symbol (apply 'concat "temp-face-" 2762 (make-symbol (apply 'concat "temp-face-"
2752 (mapcar '(lambda (sym) 2763 (mapcar '(lambda (sym)
2753 (cond ((symbolp sym) (symbol-name sym)) 2764 (cond ((symbolp sym) (symbol-name sym))
2754 ((numberp sym) (int-to-string sym)) 2765 ((numberp sym) (int-to-string sym))
2755 (t sym))) mark)))) 2766 (t sym))) mark))))
2767 (faceinfo mark))
2756 (make-face temp-face) 2768 (make-face temp-face)
2757 ;; Remove :face info from the mark, copy the face info into temp-face 2769 ;; Remove :face info from the mark, copy the face info into temp-face
2758 (setq faceinfo mark)
2759 (while (setq faceinfo (memq :face faceinfo)) 2770 (while (setq faceinfo (memq :face faceinfo))
2760 (copy-face (read (nth 1 faceinfo)) temp-face) 2771 (copy-face (read (nth 1 faceinfo)) temp-face)
2761 (setcar faceinfo nil) 2772 (setcar faceinfo nil)