Commit 5e11a170 authored by Richard M. Stallman's avatar Richard M. Stallman

Use defcustom.

parent b032077a
...@@ -51,23 +51,29 @@ ...@@ -51,23 +51,29 @@
;;; Customizable variables ;;; Customizable variables
;;; ;;;
(defvar cal-tex-which-days '(0 1 2 3 4 5 6) (defcustom cal-tex-which-days '(0 1 2 3 4 5 6)
"*The days of the week that are displayed on the portrait monthly calendar. "*The days of the week that are displayed on the portrait monthly calendar.
Sunday is 0, Monday is 1, and so on. The default is to print from Sunday to Sunday is 0, Monday is 1, and so on. The default is to print from Sunday to
Saturday. For example, use Saturday. For example, use
(setq cal-tex-which-days '(1 3 5)) (setq cal-tex-which-days '(1 3 5))
to only print Monday, Wednesday, Friday.") to only print Monday, Wednesday, Friday."
:type '(repeat integer)
:group 'calendar-tex)
(defvar cal-tex-holidays t (defcustom cal-tex-holidays t
"*If t (default), then the holidays are also printed. "*If t (default), then the holidays are also printed.
If finding the holidays is too slow, set this to nil.") If finding the holidays is too slow, set this to nil."
:type 'boolean
:group 'calendar-tex)
(defvar cal-tex-diary nil (defcustom cal-tex-diary nil
"*If t, the diary entries are printed in the calendar.") "*If t, the diary entries are printed in the calendar."
:type 'boolean
:group 'calendar-tex)
(defvar cal-tex-daily-string (defcustom cal-tex-daily-string
'(let* ((year (extract-calendar-year date)) '(let* ((year (extract-calendar-year date))
(day (calendar-day-number date)) (day (calendar-day-number date))
(days-remaining (- (calendar-day-number (list 12 31 year)) day))) (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,19 +90,29 @@ As an example of what you do, setting this to
(require 'cal-hebrew) (require 'cal-hebrew)
(calendar-hebrew-date-string date)) (calendar-hebrew-date-string date))
will put the Hebrew date at the bottom of each day.") will put the Hebrew date at the bottom of each day."
:type 'sexp
(defvar cal-tex-buffer "calendar.tex" :group 'calendar-tex)
"*The name for the tex-ed calendar.")
(defcustom cal-tex-buffer "calendar.tex"
(defvar cal-tex-24 nil "*The name for the tex-ed calendar."
"*If t, use a 24 hour clock in the daily calendar.") :type 'string
:group 'calendar-tex)
(defvar cal-tex-daily-start 8
"*The first hour of the daily calendar page.") (defcustom cal-tex-24 nil
"*If t, use a 24 hour clock in the daily calendar."
(defvar cal-tex-daily-end 20 :type 'boolean
"*The last hour of the daily calendar page.") :group 'calendar-tex)
(defcustom cal-tex-daily-start 8
"*The first hour of the daily calendar page."
:type 'integer
:group 'calendar-tex)
(defcustom cal-tex-daily-end 20
"*The last hour of the daily calendar page."
:type 'integer
:group 'calendar-tex)
;;; ;;;
;;; Definitions for LaTeX code ;;; Definitions for LaTeX code
......
...@@ -1233,7 +1233,7 @@ ending of that number (that is, `st', `nd', `rd' or `th', as appropriate." ...@@ -1233,7 +1233,7 @@ ending of that number (that is, `st', `nd', `rd' or `th', as appropriate."
"Day of year and number of days remaining in the year of date diary entry." "Day of year and number of days remaining in the year of date diary entry."
(calendar-day-of-year-string date)) (calendar-day-of-year-string date))
(defvar diary-remind-message (defcustom diary-remind-message
'("Reminder: Only " '("Reminder: Only "
(if (= 0 (% days 7)) (if (= 0 (% days 7))
(concat (int-to-string (/ days 7)) (if (= 7 days) " week" " weeks")) (concat (int-to-string (/ days 7)) (if (= 7 days) " week" " weeks"))
...@@ -1245,7 +1245,9 @@ display. ...@@ -1245,7 +1245,9 @@ display.
Used by the function `diary-remind', a pseudo-pattern is a list of Used by the function `diary-remind', a pseudo-pattern is a list of
expressions that can involve the keywords `days' (a number), `date' (a list of expressions that can involve the keywords `days' (a number), `date' (a list of
month, day, year), and `diary-entry' (a string).") month, day, year), and `diary-entry' (a string)."
:type 'sexp
:group 'diary)
(defun diary-remind (sexp days &optional marking) (defun diary-remind (sexp days &optional marking)
"Provide a reminder of a diary entry. "Provide a reminder of a diary entry.
......
;;; solar.el --- calendar functions for solar events. ;;; solar.el --- calendar functions for solar events.
;; Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc. ;; Copyright (C) 1992, 1993, 1995, 1997 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
;; Denis B. Roegel <Denis.Roegel@loria.fr> ;; Denis B. Roegel <Denis.Roegel@loria.fr>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
(require 'cal-julian) (require 'cal-julian)
;;;###autoload ;;;###autoload
(defvar calendar-time-display-form (defcustom calendar-time-display-form
'(12-hours ":" minutes am-pm '(12-hours ":" minutes am-pm
(if time-zone " (") time-zone (if time-zone ")")) (if time-zone " (") time-zone (if time-zone ")"))
"*The pseudo-pattern that governs the way a time of day is formatted. "*The pseudo-pattern that governs the way a time of day is formatted.
...@@ -77,10 +77,12 @@ For example, the form ...@@ -77,10 +77,12 @@ For example, the form
'(24-hours \":\" minutes '(24-hours \":\" minutes
(if time-zone \" (\") time-zone (if time-zone \")\")) (if time-zone \" (\") time-zone (if time-zone \")\"))
would give military-style times like `21:07 (UTC)'.") would give military-style times like `21:07 (UTC)'."
:type 'sexp
:group 'calendar)
;;;###autoload ;;;###autoload
(defvar calendar-latitude nil (defcustom calendar-latitude nil
"*Latitude of `calendar-location-name' in degrees. "*Latitude of `calendar-location-name' in degrees.
The value can be either a decimal fraction (one place of accuracy is The 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 ...@@ -88,10 +90,19 @@ sufficient), + north, - south, such as 40.7 for New York City, or the value
can be a vector [degrees minutes north/south] such as [40 50 north] for New can be a vector [degrees minutes north/south] such as [40 50 north] for New
York City. York City.
This variable should be set in `site-start'.el.") This variable should be set in `site-start'.el."
:type '(choice (const nil)
(number :tag "Exact")
(vector :value [0 0 north]
(integer :tag "Degrees")
(integer :tag "Minutes")
(choice :tag "Position"
(const north)
(const south))))
:group 'calendar)
;;;###autoload ;;;###autoload
(defvar calendar-longitude nil (defcustom calendar-longitude nil
"*Longitude of `calendar-location-name' in degrees. "*Longitude of `calendar-location-name' in degrees.
The value can be either a decimal fraction (one place of accuracy is The 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 ...@@ -99,7 +110,16 @@ sufficient), + east, - west, such as -73.9 for New York City, or the value
can be a vector [degrees minutes east/west] such as [73 55 west] for New can be a vector [degrees minutes east/west] such as [73 55 west] for New
York City. York City.
This variable should be set in `site-start'.el.") This variable should be set in `site-start'.el."
:type '(choice (const nil)
(number :tag "Exact")
(vector :value [0 0 west]
(integer :tag "Degrees")
(integer :tag "Minutes")
(choice :tag "Position"
(const east)
(const west))))
:group 'calendar)
(defsubst calendar-latitude () (defsubst calendar-latitude ()
"Convert calendar-latitude to a signed decimal fraction, if needed." "Convert calendar-latitude to a signed decimal fraction, if needed."
...@@ -122,7 +142,7 @@ This variable should be set in `site-start'.el.") ...@@ -122,7 +142,7 @@ This variable should be set in `site-start'.el.")
(- long))))) (- long)))))
;;;###autoload ;;;###autoload
(defvar calendar-location-name (defcustom calendar-location-name
'(let ((float-output-format "%.1f")) '(let ((float-output-format "%.1f"))
(format "%s%s, %s%s" (format "%s%s, %s%s"
(if (numberp calendar-latitude) (if (numberp calendar-latitude)
...@@ -143,9 +163,11 @@ This variable should be set in `site-start'.el.") ...@@ -143,9 +163,11 @@ This variable should be set in `site-start'.el.")
For example, \"New York City\". Default value is just the latitude, longitude For example, \"New York City\". Default value is just the latitude, longitude
pair. pair.
This variable should be set in `site-start'.el.") This variable should be set in `site-start'.el."
:type 'sexp
:group 'calendar)
(defvar solar-error 0.5 (defcustom solar-error 0.5
"*Tolerance (in minutes) for sunrise/sunset calculations. "*Tolerance (in minutes) for sunrise/sunset calculations.
A larger value makes the calculations for sunrise/sunset faster, but less A 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 ...@@ -156,7 +178,9 @@ It is useless to set the value smaller than 4*delta, where delta is the
accuracy in the longitude of the sun (given by the function accuracy in the longitude of the sun (given by the function
`solar-ecliptic-coordinates') in degrees since (delta/360) x (86400/60) = 4 x `solar-ecliptic-coordinates') in degrees since (delta/360) x (86400/60) = 4 x
delta. At present, delta = 0.01 degrees, so the value of the variable delta. At present, delta = 0.01 degrees, so the value of the variable
`solar-error' should be at least 0.04 minutes (about 2.5 seconds).") `solar-error' should be at least 0.04 minutes (about 2.5 seconds)."
:type 'number
:group 'calendar)
(defvar solar-n-hemi-seasons (defvar solar-n-hemi-seasons
'("Vernal Equinox" "Summer Solstice" "Autumnal Equinox" "Winter Solstice") '("Vernal Equinox" "Summer Solstice" "Autumnal Equinox" "Winter Solstice")
......
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