aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-05-03 04:58:13 +0000
committerRichard M. Stallman1997-05-03 04:58:13 +0000
commit5e11a170e7b4250b642a3bf49decad7e05fbf0f2 (patch)
tree937d564fad3293893cf5c09627a6e7ea699ac844
parentb032077ab130fe3e05d0c13b3134e36b17d42593 (diff)
downloademacs-5e11a170e7b4250b642a3bf49decad7e05fbf0f2.tar.gz
emacs-5e11a170e7b4250b642a3bf49decad7e05fbf0f2.zip
Use defcustom.
-rw-r--r--lisp/calendar/cal-tex.el56
-rw-r--r--lisp/calendar/diary-lib.el6
-rw-r--r--lisp/calendar/solar.el46
3 files changed, 75 insertions, 33 deletions
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el
index d0298bfe7f5..f01627b7891 100644
--- a/lisp/calendar/cal-tex.el
+++ b/lisp/calendar/cal-tex.el
@@ -51,23 +51,29 @@
51;;; Customizable variables 51;;; Customizable variables
52;;; 52;;;
53 53
54(defvar cal-tex-which-days '(0 1 2 3 4 5 6) 54(defcustom cal-tex-which-days '(0 1 2 3 4 5 6)
55 "*The days of the week that are displayed on the portrait monthly calendar. 55 "*The days of the week that are displayed on the portrait monthly calendar.
56Sunday is 0, Monday is 1, and so on. The default is to print from Sunday to 56Sunday is 0, Monday is 1, and so on. The default is to print from Sunday to
57Saturday. For example, use 57Saturday. For example, use
58 58
59 (setq cal-tex-which-days '(1 3 5)) 59 (setq cal-tex-which-days '(1 3 5))
60 60
61to only print Monday, Wednesday, Friday.") 61to only print Monday, Wednesday, Friday."
62 :type '(repeat integer)
63 :group 'calendar-tex)
62 64
63(defvar cal-tex-holidays t 65(defcustom cal-tex-holidays t
64 "*If t (default), then the holidays are also printed. 66 "*If t (default), then the holidays are also printed.
65If finding the holidays is too slow, set this to nil.") 67If finding the holidays is too slow, set this to nil."
68 :type 'boolean
69 :group 'calendar-tex)
66 70
67(defvar cal-tex-diary nil 71(defcustom cal-tex-diary nil
68 "*If t, the diary entries are printed in the calendar.") 72 "*If t, the diary entries are printed in the calendar."
73 :type 'boolean
74 :group 'calendar-tex)
69 75
70(defvar cal-tex-daily-string 76(defcustom cal-tex-daily-string
71 '(let* ((year (extract-calendar-year date)) 77 '(let* ((year (extract-calendar-year date))
72 (day (calendar-day-number date)) 78 (day (calendar-day-number date))
73 (days-remaining (- (calendar-day-number (list 12 31 year)) day))) 79 (days-remaining (- (calendar-day-number (list 12 31 year)) day)))
@@ -84,19 +90,29 @@ As an example of what you do, setting this to
84 (require 'cal-hebrew) 90 (require 'cal-hebrew)
85 (calendar-hebrew-date-string date)) 91 (calendar-hebrew-date-string date))
86 92
87will put the Hebrew date at the bottom of each day.") 93will put the Hebrew date at the bottom of each day."
88 94 :type 'sexp
89(defvar cal-tex-buffer "calendar.tex" 95 :group 'calendar-tex)
90 "*The name for the tex-ed calendar.") 96
91 97(defcustom cal-tex-buffer "calendar.tex"
92(defvar cal-tex-24 nil 98 "*The name for the tex-ed calendar."
93 "*If t, use a 24 hour clock in the daily calendar.") 99 :type 'string
94 100 :group 'calendar-tex)
95(defvar cal-tex-daily-start 8 101
96 "*The first hour of the daily calendar page.") 102(defcustom cal-tex-24 nil
97 103 "*If t, use a 24 hour clock in the daily calendar."
98(defvar cal-tex-daily-end 20 104 :type 'boolean
99 "*The last hour of the daily calendar page.") 105 :group 'calendar-tex)
106
107(defcustom cal-tex-daily-start 8
108 "*The first hour of the daily calendar page."
109 :type 'integer
110 :group 'calendar-tex)
111
112(defcustom cal-tex-daily-end 20
113 "*The last hour of the daily calendar page."
114 :type 'integer
115 :group 'calendar-tex)
100 116
101;;; 117;;;
102;;; Definitions for LaTeX code 118;;; Definitions for LaTeX code
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 875cc2ae840..1046296bcaf 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -1233,7 +1233,7 @@ ending of that number (that is, `st', `nd', `rd' or `th', as appropriate."
1233 "Day of year and number of days remaining in the year of date diary entry." 1233 "Day of year and number of days remaining in the year of date diary entry."
1234 (calendar-day-of-year-string date)) 1234 (calendar-day-of-year-string date))
1235 1235
1236(defvar diary-remind-message 1236(defcustom diary-remind-message
1237 '("Reminder: Only " 1237 '("Reminder: Only "
1238 (if (= 0 (% days 7)) 1238 (if (= 0 (% days 7))
1239 (concat (int-to-string (/ days 7)) (if (= 7 days) " week" " weeks")) 1239 (concat (int-to-string (/ days 7)) (if (= 7 days) " week" " weeks"))
@@ -1245,7 +1245,9 @@ display.
1245 1245
1246Used by the function `diary-remind', a pseudo-pattern is a list of 1246Used by the function `diary-remind', a pseudo-pattern is a list of
1247expressions that can involve the keywords `days' (a number), `date' (a list of 1247expressions that can involve the keywords `days' (a number), `date' (a list of
1248month, day, year), and `diary-entry' (a string).") 1248month, day, year), and `diary-entry' (a string)."
1249 :type 'sexp
1250 :group 'diary)
1249 1251
1250(defun diary-remind (sexp days &optional marking) 1252(defun diary-remind (sexp days &optional marking)
1251 "Provide a reminder of a diary entry. 1253 "Provide a reminder of a diary entry.
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index 936f78501b1..30bd74ca462 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -1,6 +1,6 @@
1;;; solar.el --- calendar functions for solar events. 1;;; solar.el --- calendar functions for solar events.
2 2
3;; Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc. 3;; Copyright (C) 1992, 1993, 1995, 1997 Free Software Foundation, Inc.
4 4
5;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> 5;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
6;; Denis B. Roegel <Denis.Roegel@loria.fr> 6;; Denis B. Roegel <Denis.Roegel@loria.fr>
@@ -63,7 +63,7 @@
63(require 'cal-julian) 63(require 'cal-julian)
64 64
65;;;###autoload 65;;;###autoload
66(defvar calendar-time-display-form 66(defcustom calendar-time-display-form
67 '(12-hours ":" minutes am-pm 67 '(12-hours ":" minutes am-pm
68 (if time-zone " (") time-zone (if time-zone ")")) 68 (if time-zone " (") time-zone (if time-zone ")"))
69 "*The pseudo-pattern that governs the way a time of day is formatted. 69 "*The pseudo-pattern that governs the way a time of day is formatted.
@@ -77,10 +77,12 @@ For example, the form
77 '(24-hours \":\" minutes 77 '(24-hours \":\" minutes
78 (if time-zone \" (\") time-zone (if time-zone \")\")) 78 (if time-zone \" (\") time-zone (if time-zone \")\"))
79 79
80would give military-style times like `21:07 (UTC)'.") 80would give military-style times like `21:07 (UTC)'."
81 :type 'sexp
82 :group 'calendar)
81 83
82;;;###autoload 84;;;###autoload
83(defvar calendar-latitude nil 85(defcustom calendar-latitude nil
84 "*Latitude of `calendar-location-name' in degrees. 86 "*Latitude of `calendar-location-name' in degrees.
85 87
86The value can be either a decimal fraction (one place of accuracy is 88The value can be either a decimal fraction (one place of accuracy is
@@ -88,10 +90,19 @@ sufficient), + north, - south, such as 40.7 for New York City, or the value
88can be a vector [degrees minutes north/south] such as [40 50 north] for New 90can be a vector [degrees minutes north/south] such as [40 50 north] for New
89York City. 91York City.
90 92
91This variable should be set in `site-start'.el.") 93This variable should be set in `site-start'.el."
94 :type '(choice (const nil)
95 (number :tag "Exact")
96 (vector :value [0 0 north]
97 (integer :tag "Degrees")
98 (integer :tag "Minutes")
99 (choice :tag "Position"
100 (const north)
101 (const south))))
102 :group 'calendar)
92 103
93;;;###autoload 104;;;###autoload
94(defvar calendar-longitude nil 105(defcustom calendar-longitude nil
95 "*Longitude of `calendar-location-name' in degrees. 106 "*Longitude of `calendar-location-name' in degrees.
96 107
97The value can be either a decimal fraction (one place of accuracy is 108The value can be either a decimal fraction (one place of accuracy is
@@ -99,7 +110,16 @@ sufficient), + east, - west, such as -73.9 for New York City, or the value
99can be a vector [degrees minutes east/west] such as [73 55 west] for New 110can be a vector [degrees minutes east/west] such as [73 55 west] for New
100York City. 111York City.
101 112
102This variable should be set in `site-start'.el.") 113This variable should be set in `site-start'.el."
114 :type '(choice (const nil)
115 (number :tag "Exact")
116 (vector :value [0 0 west]
117 (integer :tag "Degrees")
118 (integer :tag "Minutes")
119 (choice :tag "Position"
120 (const east)
121 (const west))))
122 :group 'calendar)
103 123
104(defsubst calendar-latitude () 124(defsubst calendar-latitude ()
105 "Convert calendar-latitude to a signed decimal fraction, if needed." 125 "Convert calendar-latitude to a signed decimal fraction, if needed."
@@ -122,7 +142,7 @@ This variable should be set in `site-start'.el.")
122 (- long))))) 142 (- long)))))
123 143
124;;;###autoload 144;;;###autoload
125(defvar calendar-location-name 145(defcustom calendar-location-name
126 '(let ((float-output-format "%.1f")) 146 '(let ((float-output-format "%.1f"))
127 (format "%s%s, %s%s" 147 (format "%s%s, %s%s"
128 (if (numberp calendar-latitude) 148 (if (numberp calendar-latitude)
@@ -143,9 +163,11 @@ This variable should be set in `site-start'.el.")
143For example, \"New York City\". Default value is just the latitude, longitude 163For example, \"New York City\". Default value is just the latitude, longitude
144pair. 164pair.
145 165
146This variable should be set in `site-start'.el.") 166This variable should be set in `site-start'.el."
167 :type 'sexp
168 :group 'calendar)
147 169
148(defvar solar-error 0.5 170(defcustom solar-error 0.5
149"*Tolerance (in minutes) for sunrise/sunset calculations. 171"*Tolerance (in minutes) for sunrise/sunset calculations.
150 172
151A larger value makes the calculations for sunrise/sunset faster, but less 173A larger value makes the calculations for sunrise/sunset faster, but less
@@ -156,7 +178,9 @@ It is useless to set the value smaller than 4*delta, where delta is the
156accuracy in the longitude of the sun (given by the function 178accuracy in the longitude of the sun (given by the function
157`solar-ecliptic-coordinates') in degrees since (delta/360) x (86400/60) = 4 x 179`solar-ecliptic-coordinates') in degrees since (delta/360) x (86400/60) = 4 x
158delta. At present, delta = 0.01 degrees, so the value of the variable 180delta. At present, delta = 0.01 degrees, so the value of the variable
159`solar-error' should be at least 0.04 minutes (about 2.5 seconds).") 181`solar-error' should be at least 0.04 minutes (about 2.5 seconds)."
182 :type 'number
183 :group 'calendar)
160 184
161(defvar solar-n-hemi-seasons 185(defvar solar-n-hemi-seasons
162 '("Vernal Equinox" "Summer Solstice" "Autumnal Equinox" "Winter Solstice") 186 '("Vernal Equinox" "Summer Solstice" "Autumnal Equinox" "Winter Solstice")