[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master dca8b4a 1/2: Rename recent calendar user option
From: |
Glenn Morris |
Subject: |
master dca8b4a 1/2: Rename recent calendar user option |
Date: |
Wed, 12 Aug 2020 06:31:00 -0400 (EDT) |
branch: master
commit dca8b4ac5853767a1deb1947e72d038b4f4bb068
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>
Rename recent calendar user option
* lisp/calendar/calendar.el (calendar-time-zone-style):
Rename from calendar-use-numeric-time-zones.
* lisp/calendar/cal-dst.el (calendar-standard-time-zone-name)
(calendar-daylight-time-zone-name):
* lisp/calendar/solar.el (sunrise-sunset, solar-equinoxes-solstices):
Use new variable name.
* doc/emacs/calendar.texi (Sunrise/Sunset): Update.
; * etc/NEWS: Update.
---
doc/emacs/calendar.texi | 5 ++---
etc/NEWS | 9 ++++-----
lisp/calendar/cal-dst.el | 6 ++++--
lisp/calendar/calendar.el | 10 ++++++----
lisp/calendar/solar.el | 4 ++--
5 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi
index 31db815..e5ee7e9 100644
--- a/doc/emacs/calendar.texi
+++ b/doc/emacs/calendar.texi
@@ -625,10 +625,9 @@ your time zone. Emacs displays the times of sunrise and
sunset
@emph{corrected for daylight saving time}. @xref{Daylight Saving},
for how daylight saving time is determined.
-@vindex calendar-use-numeric-time-zones
+@vindex calendar-time-zone-style
If you want to display numerical time zones (like @samp{"+0100"})
-instead of symbolic time zones (like @samp{"CET"}), set the
-@code{calendar-use-numeric-time-zones} variable to non-@code{nil}.
+instead of symbolic ones (like @samp{"CET"}), set this to @code{numeric}.
As a user, you might find it convenient to set the calendar location
variables for your usual physical location in your @file{.emacs} file.
diff --git a/etc/NEWS b/etc/NEWS
index 3921789..5093336 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -215,15 +215,14 @@ as a data list rather than as a piece of code.
** Calendar
+++
-*** New variable 'calendar-use-numeric-time-zones' to use numeric time zones.
-If non-nil, functions that display time zones (like the 'S' command in
-calendar mode that displays the sunrise time) will display time zones
-like "+0100" instead of "CET".
+*** New user option 'calendar-time-zone-style'.
+If 'numeric, calendar functions (eg calendar-sunrise-sunset) that display
+time zones will use a form like "+0100" instead of "CET".
** Dired
+++
-*** New used option 'dired-copy-dereference'.
+*** New user option 'dired-copy-dereference'.
If set, Dired will dereferences symbolic links when copying. This can
be switched off on a per-usage basis by providing 'dired-do-copy' with
a 'C-u' prefix.
diff --git a/lisp/calendar/cal-dst.el b/lisp/calendar/cal-dst.el
index af6acaf..05768e1 100644
--- a/lisp/calendar/cal-dst.el
+++ b/lisp/calendar/cal-dst.el
@@ -350,7 +350,7 @@ If the locale never uses daylight saving time, set this to
0."
:group 'calendar-dst)
(defcustom calendar-standard-time-zone-name
- (if calendar-use-numeric-time-zones
+ (if (eq calendar-time-zone-style 'numeric)
(if calendar-current-time-zone-cache
(format-time-string
"%z" 0 (* 60 (car calendar-current-time-zone-cache)))
@@ -360,10 +360,11 @@ If the locale never uses daylight saving time, set this
to 0."
For example, \"EST\" in New York City, \"PST\" for Los Angeles."
:type 'string
:version "28.1"
+ :set-after '(calendar-time-zone-style)
:group 'calendar-dst)
(defcustom calendar-daylight-time-zone-name
- (if calendar-use-numeric-time-zones
+ (if (eq calendar-time-zone-style 'numeric)
(if calendar-current-time-zone-cache
(format-time-string
"%z" 0 (* 60 (cadr calendar-current-time-zone-cache)))
@@ -373,6 +374,7 @@ For example, \"EST\" in New York City, \"PST\" for Los
Angeles."
For example, \"EDT\" in New York City, \"PDT\" for Los Angeles."
:type 'string
:version "28.1"
+ :set-after '(calendar-time-zone-style)
:group 'calendar-dst)
(defcustom calendar-daylight-savings-starts-time
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 0efb2bc..5742614 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1061,10 +1061,12 @@ calendar."
:type 'boolean
:group 'holidays)
-(defcustom calendar-use-numeric-time-zones nil
- "If nil, use symbolic time zones like \"CET\" when displaying dates.
-If non-nil, use numeric time zones like \"+0100\"."
- :type 'boolean
+;; fixme should have a :set that changes calendar-standard-time-zone-name etc.
+(defcustom calendar-time-zone-style 'symbolic
+ "Your preferred style for time zones.
+If 'numeric, use numeric time zones like \"+0100\".
+Otherwise, use symbolic time zones like \"CET\"."
+ :type '(choice (const numeric) (other symbolic))
:version "28.1"
:group 'calendar)
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index 635bdd8..85c3c48 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -840,7 +840,7 @@ This function is suitable for execution in an init file."
(calendar-standard-time-zone-name
(if (< arg 16) calendar-standard-time-zone-name
(cond ((zerop calendar-time-zone)
- (if calendar-use-numeric-time-zones
+ (if (eq calendar-time-zone-style 'numeric)
"+0100" "UTC"))
((< calendar-time-zone 0)
(format "UTC%dmin" calendar-time-zone))
@@ -1016,7 +1016,7 @@ Requires floating point."
(calendar-standard-time-zone-name
(cond
(calendar-time-zone calendar-standard-time-zone-name)
- (calendar-use-numeric-time-zones "+0100")
+ ((eq calendar-time-zone-style 'numeric) "+0100")
(t "UTC")))
(calendar-daylight-savings-starts
(if calendar-time-zone calendar-daylight-savings-starts))