Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
5e11a170
Commit
5e11a170
authored
May 03, 1997
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use defcustom.
parent
b032077a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
33 deletions
+75
-33
lisp/calendar/cal-tex.el
lisp/calendar/cal-tex.el
+36
-20
lisp/calendar/diary-lib.el
lisp/calendar/diary-lib.el
+4
-2
lisp/calendar/solar.el
lisp/calendar/solar.el
+35
-11
No files found.
lisp/calendar/cal-tex.el
View file @
5e11a170
...
...
@@ -51,23 +51,29 @@
;;; Customizable variables
;;;
(
def
var
cal-tex-which-days
'
(
0
1
2
3
4
5
6
)
(
def
custom
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
)
(
def
var
cal-tex-holidays
t
(
def
custom
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
)
(
def
var
cal-tex-daily-string
(
def
custom
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
...
...
lisp/calendar/diary-lib.el
View file @
5e11a170
...
...
@@ -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
))
(
def
var
diary-remind-message
(
def
custom
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.
...
...
lisp/calendar/solar.el
View file @
5e11a170
;;; 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
(
def
var
calendar-time-display-form
(
def
custom
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
(
def
var
calendar-latitude
nil
(
def
custom
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
(
def
var
calendar-longitude
nil
(
def
custom
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
(
def
var
calendar-location-name
(
def
custom
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
)
(
def
var
solar-error
0.5
(
def
custom
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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment