diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-05-03 04:58:13 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-05-03 04:58:13 +0000 |
commit | 926582e336185976982628d515facc242752a6e1 (patch) | |
tree | de527932a67e91f28df79e5a1de627b338b491a4 /lisp/calendar | |
parent | 4d7260b2e605b79913f9546ec55ed689531bcf29 (diff) | |
download | emacs-926582e336185976982628d515facc242752a6e1.tar.gz |
Use defcustom.
Diffstat (limited to 'lisp/calendar')
-rw-r--r-- | lisp/calendar/cal-tex.el | 56 | ||||
-rw-r--r-- | lisp/calendar/diary-lib.el | 6 | ||||
-rw-r--r-- | lisp/calendar/solar.el | 46 |
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 @@ ;;; 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. Sunday is 0, Monday is 1, and so on. The default is to print from Sunday to Saturday. For example, use (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 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 - "*If t, the diary entries are printed in the calendar.") +(defcustom cal-tex-diary nil + "*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)) (day (calendar-day-number date)) (days-remaining (- (calendar-day-number (list 12 31 year)) day))) @@ -84,19 +90,29 @@ As an example of what you do, setting this to (require 'cal-hebrew) (calendar-hebrew-date-string date)) -will put the Hebrew date at the bottom of each day.") - -(defvar cal-tex-buffer "calendar.tex" - "*The name for the tex-ed calendar.") - -(defvar cal-tex-24 nil - "*If t, use a 24 hour clock in the daily calendar.") - -(defvar cal-tex-daily-start 8 - "*The first hour of the daily calendar page.") - -(defvar cal-tex-daily-end 20 - "*The last hour of the daily calendar page.") +will put the Hebrew date at the bottom of each day." + :type 'sexp + :group 'calendar-tex) + +(defcustom cal-tex-buffer "calendar.tex" + "*The name for the tex-ed calendar." + :type 'string + :group 'calendar-tex) + +(defcustom cal-tex-24 nil + "*If t, use a 24 hour clock in the daily calendar." + :type 'boolean + :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 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." "Day of year and number of days remaining in the year of date diary entry." (calendar-day-of-year-string date)) -(defvar diary-remind-message +(defcustom diary-remind-message '("Reminder: Only " (if (= 0 (% days 7)) (concat (int-to-string (/ days 7)) (if (= 7 days) " week" " weeks")) @@ -1245,7 +1245,9 @@ display. 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 -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) "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 @@ ;;; 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> ;; Denis B. Roegel <Denis.Roegel@loria.fr> @@ -63,7 +63,7 @@ (require 'cal-julian) ;;;###autoload -(defvar calendar-time-display-form +(defcustom calendar-time-display-form '(12-hours ":" minutes am-pm (if time-zone " (") time-zone (if time-zone ")")) "*The pseudo-pattern that governs the way a time of day is formatted. @@ -77,10 +77,12 @@ For example, the form '(24-hours \":\" minutes (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 -(defvar calendar-latitude nil +(defcustom calendar-latitude nil "*Latitude of `calendar-location-name' in degrees. 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 can be a vector [degrees minutes north/south] such as [40 50 north] for New 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 -(defvar calendar-longitude nil +(defcustom calendar-longitude nil "*Longitude of `calendar-location-name' in degrees. 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 can be a vector [degrees minutes east/west] such as [73 55 west] for New 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 () "Convert calendar-latitude to a signed decimal fraction, if needed." @@ -122,7 +142,7 @@ This variable should be set in `site-start'.el.") (- long))))) ;;;###autoload -(defvar calendar-location-name +(defcustom calendar-location-name '(let ((float-output-format "%.1f")) (format "%s%s, %s%s" (if (numberp calendar-latitude) @@ -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 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. 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 accuracy in the longitude of the sun (given by the function `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 -`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 '("Vernal Equinox" "Summer Solstice" "Autumnal Equinox" "Winter Solstice") |