"" ; pre-Bahai
(let ((m (calendar-extract-month bahai-date))
(d (calendar-extract-day bahai-date)))
- (calendar-dlet*
+ (calendar-dlet
((monthname (if (and (= m 19)
(<= d 0))
"Ayyám-i-Há"
(m (calendar-extract-month coptic-date)))
(if (< y 1)
""
- (calendar-dlet*
+ (calendar-dlet
((monthname (aref calendar-coptic-month-name-array (1- m)))
(day (number-to-string (calendar-extract-day coptic-date)))
(dayname nil)
(calendar-persian-to-absolute `(7 1 ,(- year 621))))))))
(prevday-sec (- -1 utc-diff)) ; last sec of previous local day
new-rules)
- (calendar-dlet* ((year (1+ y)))
+ (calendar-dlet ((year (1+ y)))
;; Scan through the next few years until only one rule remains.
(while (cdr candidate-rules)
(dolist (rule candidate-rules)
(or (let ((expr (if calendar-dst-check-each-year-flag
(cadr (calendar-dst-find-startend year))
(nth 4 calendar-current-time-zone-cache))))
- (calendar-dlet* ((year year))
+ (calendar-dlet ((year year))
(if expr (eval expr))))
;; New US rules commencing 2007. https://www.iana.org/time-zones
(and (not (zerop calendar-daylight-time-offset))
(or (let ((expr (if calendar-dst-check-each-year-flag
(nth 2 (calendar-dst-find-startend year))
(nth 5 calendar-current-time-zone-cache))))
- (calendar-dlet* ((year year))
+ (calendar-dlet ((year year))
(if expr (eval expr))))
;; New US rules commencing 2007. https://www.iana.org/time-zones
(and (not (zerop calendar-daylight-time-offset))
(defun dst-in-effect (date)
"True if on absolute DATE daylight saving time is in effect.
Fractional part of DATE is local standard time of day."
- (calendar-dlet* ((year (calendar-extract-year
+ (calendar-dlet ((year (calendar-extract-year
(calendar-gregorian-from-absolute (floor date)))))
(let* ((dst-starts-gregorian (eval calendar-daylight-savings-starts))
(dst-ends-gregorian (eval calendar-daylight-savings-ends))
(or date (calendar-current-date)))))
(y (calendar-extract-year persian-date))
(m (calendar-extract-month persian-date)))
- (calendar-dlet*
+ (calendar-dlet
((monthname (aref calendar-persian-month-name-array (1- m)))
(day (number-to-string (calendar-extract-day persian-date)))
(year (number-to-string y))
;; - whatever is passed to diary-sexp-entry
;; - whatever is passed to diary-remind
-(defmacro calendar-dlet* (binders &rest body)
+(defmacro calendar-dlet (binders &rest body)
"Like `dlet' but without warnings about non-prefixed var names."
(declare (indent 1) (debug let))
(let ((vars (mapcar (lambda (binder)
(goto-char (point-min))
(calendar-move-to-column indent)
(insert
- (calendar-dlet* ((month month) (year year))
+ (calendar-dlet ((month month) (year year))
(calendar-string-spread (list calendar-month-header)
?\s calendar-month-digit-width)))
(calendar-ensure-newline)
calendar-day-header-width nil ?\s)
(make-string (- calendar-column-width calendar-day-header-width) ?\s)))
(calendar-ensure-newline)
- (calendar-dlet* ((day day) (month month) (year year))
+ (calendar-dlet ((day day) (month month) (year year))
(calendar-insert-at-column indent calendar-intermonth-text trunc))
;; Add blank days before the first of the month.
(insert (make-string (* blank-days calendar-column-width) ?\s))
(insert (propertize
(format (format "%%%dd" calendar-day-digit-width) day)
'mouse-face 'highlight
- 'help-echo (calendar-dlet* ((day day) (month month) (year year))
+ 'help-echo (calendar-dlet ((day day) (month month) (year year))
(eval calendar-date-echo-text t))
;; 'date property prevents intermonth text confusing re-searches.
;; (Tried intangible, it did not really work.)
(/= day last))
(calendar-ensure-newline)
(setq day (1+ day)) ; first day of next week
- (calendar-dlet* ((day day) (month month) (year year))
+ (calendar-dlet ((day day) (month month) (year year))
(calendar-insert-at-column indent calendar-intermonth-text trunc))))))
(defun calendar-redraw ()
(bufferp (get-buffer calendar-buffer)))
(with-current-buffer calendar-buffer
(let ((start (- calendar-left-margin 2)))
- (calendar-dlet* ((date (condition-case nil
+ (calendar-dlet ((date (condition-case nil
(calendar-cursor-to-nearest-date)
(error (calendar-current-date)))))
(setq mode-line-format
respectively. An optional parameter NODAYNAME, when t, omits the
name of the day of the week."
(let ((month (calendar-extract-month date)))
- (calendar-dlet*
+ (calendar-dlet
((dayname (unless nodayname (calendar-day-name date abbreviate)))
(monthname (calendar-month-name month abbreviate))
(day (number-to-string (calendar-extract-day date)))
(calendar-month-name-array (or months calendar-month-name-array))
(case-fold-search t)
entry-found)
- (calendar-dlet*
+ (calendar-dlet
((dayname (format "%s\\|%s\\.?" (calendar-day-name date)
(calendar-day-name date 'abbrev)))
(monthname (format "\\*\\|%s%s" (calendar-month-name month)
;; every time, diary-include-other-diary-files
;; binds it to nil (essentially) when it runs
;; in included files.
- (calendar-dlet* ((number number)
+ (calendar-dlet ((number number)
(list-only list-only))
(run-hooks 'diary-nongregorian-listing-hook
'diary-list-entries-hook))
(copy-sequence
(car display-buffer-fallback-action))))))
(funcall diary-display-function)))
- (calendar-dlet* ((number number)
+ (calendar-dlet ((number number)
(original-date original-date))
(run-hooks 'diary-hook))))))
(and temp-buff (buffer-name temp-buff) (kill-buffer temp-buff)))
matching a given date pattern. MONTHS is an array of month names.
SYMBOL marks diary entries of the type in question. ABSFUNC is a
function that converts absolute dates to dates of the appropriate type."
- (calendar-dlet*
+ (calendar-dlet
((dayname (diary-name-pattern calendar-day-name-array
calendar-day-abbrev-array))
(monthname (format "%s\\|\\*"
(defun diary-sexp-entry (sexp entry date)
"Process a SEXP diary ENTRY for DATE."
(let ((result
- (calendar-dlet* ((date date)
+ (calendar-dlet ((date date)
(entry entry))
(if calendar-debug-sexp
(let ((debug-on-error t))
(and (integerp days)
(< days 0)
(setq days (number-sequence 1 (- days))))
- (calendar-dlet* ((diary-entry (eval sexp)))
+ (calendar-dlet ((diary-entry (eval sexp)))
(cond
;; Diary entry applies on date.
((and diary-entry
(when (setq diary-entry (eval sexp))
;; Discard any mark portion from diary-anniversary, etc.
(if (consp diary-entry) (setq diary-entry (cdr diary-entry)))
- (calendar-dlet* ((days days))
+ (calendar-dlet ((days days))
(mapconcat #'eval diary-remind-message "")))))
;; Diary entry may apply to one of a list of days before date.
((and (listp days) days)
optional ABBREV-ARRAY is present, also matches the abbreviations
from this array (with or without a final `.'), in addition to the
full month names."
- (calendar-dlet*
+ (calendar-dlet
((dayname (diary-name-pattern calendar-day-name-array
calendar-day-abbrev-array t))
(monthname (format "\\(%s\\|\\*\\)"
This depends on the calendar date style."
(declare (obsolete nil "28.1"))
(concat
- (calendar-dlet*
+ (calendar-dlet
((dayname (diary-name-pattern calendar-day-name-array nil t))
(monthname (diary-name-pattern calendar-month-name-array nil t))
(day "1")
(y displayed-year))
(calendar-increment-month m y -1)
(holiday-filter-visible-calendar
- (calendar-dlet* (year date)
+ (calendar-dlet (year date)
(list
(progn
(setq year y
;;BUT remove today if `diary-float'
;;expression does not hold true for today:
(when
- (null (calendar-dlet* ((date (calendar-current-date))
- (entry entry-main))
+ (null (calendar-dlet ((date (calendar-current-date))
+ (entry entry-main))
(diary-float month dayname n)))
(concat
"\nEXDATE;VALUE=DATE:"
Format used is given by `calendar-time-display-form'."
(let* ((time (round (* 60 time)))
(24-hours (/ time 60)))
- (calendar-dlet*
+ (calendar-dlet
((time-zone time-zone)
(minutes (format "%02d" (% time 60)))
(12-hours (format "%d" (1+ (% (+ 24-hours 11) 12))))
(defconst todo-date-pattern
(let ((dayname (diary-name-pattern calendar-day-name-array nil t)))
(concat "\\(?4:\\(?5:" dayname "\\)\\|"
- (calendar-dlet*
+ (calendar-dlet
((dayname)
(monthname (format "\\(?6:%s\\)" (diary-name-pattern
todo-month-name-array
;; changed, rebuild the date string.
(when (memq what '(year month day))
(setq ndate
- (calendar-dlet*
+ (calendar-dlet
;; Needed by calendar-date-display-form.
((year year)
(monthname monthname)
(defun todo-convert-legacy-date-time ()
"Return converted date-time string.
Helper function for `todo-convert-legacy-files'."
- (calendar-dlet*
+ (calendar-dlet
((year (match-string 1))
(month (match-string 2))
(monthname (calendar-month-name (string-to-number month) t))
When ARG is `day', non-nil arguments MO and YR determine the
number of the last the day of the month."
- (calendar-dlet*
+ (calendar-dlet
(year monthname month day dayname) ;Needed by calendar-date-display-form.
(when (or (not arg) (eq arg 'year))
(while (if (natnump year) (< year 1) (not (eq year '*)))
(t `(let* ,(nreverse seqbinds) ,nbody))))))
(defmacro dlet (binders &rest body)
- "Like `let*' but using dynamic scoping."
+ "Like `let' but using dynamic scoping."
(declare (indent 1) (debug let))
;; (defvar FOO) only affects the current scope, but in order for
- ;; this not to affect code after the `let*' we need to create a new scope,
+ ;; this not to affect code after the main `let' we need to create a new scope,
;; which is what the surrounding `let' is for.
;; FIXME: (let () ...) currently doesn't actually create a new scope,
;; which is why we use (let (_) ...).
,@(mapcar (lambda (binder)
`(defvar ,(if (consp binder) (car binder) binder)))
binders)
- (let* ,binders ,@body)))
+ (let ,binders ,@body)))
(defmacro with-wrapper-hook (hook args &rest body)