[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103945: calendar housekeeping prompt
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103945: calendar housekeeping prompted by lexical-binding. |
Date: |
Mon, 18 Apr 2011 21:11:01 -0700 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 103945
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2011-04-18 21:11:01 -0700
message:
calendar housekeeping prompted by lexical-binding.
* lisp/calendar/appt.el (appt-make-list):
* lisp/calendar/cal-china.el (calendar-chinese-date-string):
* lisp/calendar/cal-hebrew.el (calendar-hebrew-list-yahrzeits)
(diary-hebrew-yahrzeit):
* lisp/calendar/cal-tex.el (cal-tex-last-blank-p, cal-tex-cursor-week2):
* lisp/calendar/calendar.el (calendar-generate-window):
* lisp/calendar/time-date.el (time-to-days):
Remove unused local variables.
* lisp/calendar/cal-dst.el (dst-adjust-time): Remove never-implemented
optional argument `style'.
* lisp/calendar/cal-tex.el (cal-tex-list-holidays, cal-tex-cursor-month)
(cal-tex-cursor-week, cal-tex-cursor-week2, cal-tex-cursor-week-iso)
(cal-tex-cursor-filofax-2week, cal-tex-cursor-filofax-week)
(cal-tex-cursor-filofax-daily, cal-tex-mini-calendar)
* lisp/calendar/cal-html.el (cal-html-insert-minical):
* lisp/calendar/diary-lib.el (diary-list-entries-1, diary-list-entries)
(calendar-mark-date-pattern):
Prefix "unused" locals.
modified:
lisp/ChangeLog
lisp/calendar/appt.el
lisp/calendar/cal-china.el
lisp/calendar/cal-dst.el
lisp/calendar/cal-hebrew.el
lisp/calendar/cal-html.el
lisp/calendar/cal-tex.el
lisp/calendar/calendar.el
lisp/calendar/diary-lib.el
lisp/calendar/time-date.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-04-18 23:21:31 +0000
+++ b/lisp/ChangeLog 2011-04-19 04:11:01 +0000
@@ -1,3 +1,26 @@
+2011-04-19 Glenn Morris <address@hidden>
+
+ * calendar/cal-tex.el (cal-tex-list-holidays, cal-tex-cursor-month)
+ (cal-tex-cursor-week, cal-tex-cursor-week2, cal-tex-cursor-week-iso)
+ (cal-tex-cursor-filofax-2week, cal-tex-cursor-filofax-week)
+ (cal-tex-cursor-filofax-daily, cal-tex-mini-calendar)
+ * calendar/cal-html.el (cal-html-insert-minical):
+ * calendar/diary-lib.el (diary-list-entries-1, diary-list-entries)
+ (calendar-mark-date-pattern):
+ Prefix "unused" locals.
+
+ * calendar/cal-dst.el (dst-adjust-time): Remove never-implemented
+ optional argument `style'.
+
+ * calendar/appt.el (appt-make-list):
+ * calendar/cal-china.el (calendar-chinese-date-string):
+ * calendar/cal-hebrew.el (calendar-hebrew-list-yahrzeits)
+ (diary-hebrew-yahrzeit):
+ * calendar/cal-tex.el (cal-tex-last-blank-p, cal-tex-cursor-week2):
+ * calendar/calendar.el (calendar-generate-window):
+ * calendar/time-date.el (time-to-days):
+ Remove unused local variables.
+
2011-04-18 Chong Yidong <address@hidden>
* emacs-lisp/tabulated-list.el (tabulated-list-mode): Use a custom
=== modified file 'lisp/calendar/appt.el'
--- a/lisp/calendar/appt.el 2011-01-26 08:36:39 +0000
+++ b/lisp/calendar/appt.el 2011-04-19 04:11:01 +0000
@@ -509,7 +509,6 @@
;; entry begins with a time, add it to the
;; appt-time-msg-list. Then sort the list.
(let ((entry-list diary-entries-list)
- (new-time-string "")
time-string)
;; Below, we assume diary-entries-list was in date
;; order. It is, unless something on
=== modified file 'lisp/calendar/cal-china.el'
--- a/lisp/calendar/cal-china.el 2011-01-25 04:08:28 +0000
+++ b/lisp/calendar/cal-china.el 2011-04-19 04:11:01 +0000
@@ -575,8 +575,7 @@
;; Remainder of (1+(floor month))/12, with
;; 12 instead of 0.
(1+ (mod (floor month) 12))
- 1)))
- (m-cycle (% (+ (* year 5) (floor month)) 60)))
+ 1))))
(format "Cycle %s, year %s (%s), %smonth %s%s, day %s (%s)"
cycle
year (calendar-chinese-sexagesimal-name year)
=== modified file 'lisp/calendar/cal-dst.el'
--- a/lisp/calendar/cal-dst.el 2011-01-25 04:08:28 +0000
+++ b/lisp/calendar/cal-dst.el 2011-04-19 04:11:01 +0000
@@ -445,16 +445,12 @@
(or (<= dst-starts date) (< date dst-ends))))))
;; used by calc, lunar, solar.
-(defun dst-adjust-time (date time &optional style)
+(defun dst-adjust-time (date time)
"Adjust, to account for dst on DATE, decimal fraction standard TIME.
Returns a list (date adj-time zone) where `date' and `adj-time' are the values
adjusted for `zone'; here `date' is a list (month day year), `adj-time' is a
decimal fraction time, and `zone' is a string.
-Optional parameter STYLE forces the result time to be standard time when its
-value is 'standard and daylight saving time (if available) when its value is
-'daylight.
-
Conversion to daylight saving time is done according to
`calendar-daylight-savings-starts', `calendar-daylight-savings-ends',
`calendar-daylight-savings-starts-time',
=== modified file 'lisp/calendar/cal-hebrew.el'
--- a/lisp/calendar/cal-hebrew.el 2011-04-12 04:02:38 +0000
+++ b/lisp/calendar/cal-hebrew.el 2011-04-19 04:11:01 +0000
@@ -764,8 +764,6 @@
(message "Computing Yahrzeits...")
(let* ((h-date (calendar-hebrew-from-absolute
(calendar-absolute-from-gregorian death-date)))
- (h-month (calendar-extract-month h-date))
- (h-day (calendar-extract-day h-date))
(h-year (calendar-extract-year h-date))
(i (1- start-year)))
(calendar-in-read-only-buffer calendar-hebrew-yahrzeit-buffer
@@ -900,8 +898,6 @@
(+ (calendar-absolute-from-gregorian
(diary-make-date death-month death-day death-year))
(if after-sunset 1 0))))
- (h-month (calendar-extract-month h-date))
- (h-day (calendar-extract-day h-date))
(h-year (calendar-extract-year h-date))
(d (calendar-absolute-from-gregorian date))
(yr (calendar-extract-year (calendar-hebrew-from-absolute d)))
=== modified file 'lisp/calendar/cal-html.el'
--- a/lisp/calendar/cal-html.el 2011-01-26 08:36:39 +0000
+++ b/lisp/calendar/cal-html.el 2011-04-19 04:11:01 +0000
@@ -247,7 +247,7 @@
(insert cal-html-e-tablerow-string)
;; Initial empty slots.
(insert cal-html-b-tablerow-string)
- (dotimes (i blank-days)
+ (dotimes (_i blank-days)
(insert
cal-html-b-tabledata-string
cal-html-e-tabledata-string))
=== modified file 'lisp/calendar/cal-tex.el'
--- a/lisp/calendar/cal-tex.el 2011-04-12 07:03:52 +0000
+++ b/lisp/calendar/cal-tex.el 2011-04-19 04:11:01 +0000
@@ -253,7 +253,7 @@
3)))
holidays in-range a)
(calendar-increment-month displayed-month displayed-year 1)
- (dotimes (idummy number-of-intervals)
+ (dotimes (_idummy number-of-intervals)
(setq holidays (append holidays (calendar-holiday-list)))
(calendar-increment-month displayed-month displayed-year 3))
(dolist (hol holidays)
@@ -525,7 +525,7 @@
(cal-tex-insert-day-names)
(cal-tex-nl ".2cm")
(cal-tex-insert-blank-days month year cal-tex-day-prefix)
- (dotimes (idummy n)
+ (dotimes (_idummy n)
(cal-tex-insert-days month year diary-list holidays cal-tex-day-prefix)
(when (= (calendar-week-end-day)
(calendar-day-of-week
@@ -642,7 +642,7 @@
;; start of the last week in the month.
(catch 'found
(let ((last-day (calendar-last-day-of-month month year))
- day dow)
+ dow)
(dotimes (i 7)
(if (memq (setq dow (calendar-day-of-week
(list month (- last-day i) year)))
@@ -717,7 +717,7 @@
(cal-tex-e-center)
(cal-tex-hspace "-.2in")
(cal-tex-b-parbox "l" "7in")
- (dotimes (jdummy 7)
+ (dotimes (_jdummy 7)
(cal-tex-week-hours date holidays "3.1")
(setq date (cal-tex-incr-date date)))
(cal-tex-e-parbox)
@@ -749,7 +749,6 @@
(calendar-cursor-to-date t event)))))
(month (calendar-extract-month date))
(year (calendar-extract-year date))
- (d date)
(d1 (calendar-absolute-from-gregorian date))
(d2 (+ (* 7 n) d1))
(holidays (if cal-tex-holidays
@@ -773,7 +772,7 @@
(cal-tex-e-center)
(cal-tex-hspace "-.2in")
(cal-tex-b-parbox "l" "\\textwidth")
- (dotimes (jdummy 3)
+ (dotimes (_jdummy 3)
(cal-tex-week-hours date holidays "5")
(setq date (cal-tex-incr-date date)))
(cal-tex-e-parbox)
@@ -801,7 +800,7 @@
(insert "}")
(cal-tex-nl)
(cal-tex-b-parbox "l" "\\textwidth")
- (dotimes (jdummy 4)
+ (dotimes (_jdummy 4)
(cal-tex-week-hours date holidays "5")
(setq date (cal-tex-incr-date date)))
(cal-tex-e-parbox)
@@ -863,7 +862,7 @@
(cal-tex-nl ".5cm")
(cal-tex-e-center)
(cal-tex-b-parbox "l" "\\textwidth")
- (dotimes (j 7)
+ (dotimes (_j 7)
(cal-tex-b-parbox "t" "\\textwidth")
(cal-tex-b-parbox "t" "\\textwidth")
(cal-tex-rule "0pt" "\\textwidth" ".2mm")
@@ -1112,7 +1111,7 @@
(cal-tex-month-name (calendar-extract-month d))
(calendar-extract-year d))))))
(insert "%\n")
- (dotimes (jdummy 7)
+ (dotimes (_jdummy 7)
(if (zerop (mod i 2))
(insert "\\rightday")
(insert "\\leftday"))
@@ -1216,7 +1215,7 @@
(cal-tex-month-name (calendar-extract-month d))
(calendar-extract-year d))))))
(insert "%\n")
- (dotimes (jdummy 3)
+ (dotimes (_jdummy 3)
(insert "\\leftday")
(cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
(cal-tex-arg (number-to-string (calendar-extract-day date)))
@@ -1247,7 +1246,7 @@
(cal-tex-month-name (calendar-extract-month d))
(calendar-extract-year d))))))
(insert "%\n")
- (dotimes (jdummy 2)
+ (dotimes (_jdummy 2)
(insert "\\rightday")
(cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
(cal-tex-arg (number-to-string (calendar-extract-day date)))
@@ -1256,7 +1255,7 @@
(cal-tex-arg (eval cal-tex-daily-string))
(insert "%\n")
(setq date (cal-tex-incr-date date)))
- (dotimes (jdummy 2)
+ (dotimes (_jdummy 2)
(insert "\\weekend")
(cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
(cal-tex-arg (number-to-string (calendar-extract-day date)))
@@ -1362,7 +1361,7 @@
(cal-tex-newpage)
(setq date (cal-tex-incr-date date)))
(insert "%\n")
- (dotimes (jdummy 2)
+ (dotimes (_jdummy 2)
(insert "\\lefthead")
(cal-tex-arg (calendar-date-string date))
(insert "\\weekend")
@@ -1523,7 +1522,7 @@
(if (= i 6)
"\\\\[0.7mm]\n"
" & "))))
- (dotimes (idummy blank-days)
+ (dotimes (_idummy blank-days)
(setq str (concat str " & ")))
(dotimes (i last)
(setq str (concat str (number-to-string (1+ i)))
=== modified file 'lisp/calendar/calendar.el'
--- a/lisp/calendar/calendar.el 2011-04-06 02:05:45 +0000
+++ b/lisp/calendar/calendar.el 2011-04-19 04:11:01 +0000
@@ -1363,7 +1363,6 @@
(year (calendar-extract-year today))
(today-visible (or (not mon)
(<= (abs (calendar-interval mon yr month year))
1)))
- (day-in-week (calendar-day-of-week today))
(in-calendar-window (eq (window-buffer (selected-window))
(get-buffer calendar-buffer))))
(calendar-generate (or mon month) (or yr year))
=== modified file 'lisp/calendar/diary-lib.el'
--- a/lisp/calendar/diary-lib.el 2011-04-17 02:11:49 +0000
+++ b/lisp/calendar/diary-lib.el 2011-04-19 04:11:01 +0000
@@ -710,7 +710,7 @@
in question. ABSFUNC is a function that converts absolute dates to dates
of the appropriate type."
(let ((gdate original-date))
- (dotimes (idummy number)
+ (dotimes (_idummy number)
(diary-list-entries-2
(funcall absfunc (calendar-absolute-from-gregorian gdate))
diary-nonmarking-symbol file-glob-attrs list-only months symbol gdate)
@@ -820,7 +820,7 @@
(set (make-local-variable 'diary-selective-display) t)
(overlay-put ol 'invisible 'diary)
(overlay-put ol 'evaporate t)))
- (dotimes (idummy number)
+ (dotimes (_idummy number)
(let ((sexp-found (diary-list-sexp-entries date))
(entry-found (diary-list-entries-2
date diary-nonmarking-symbol
@@ -1509,7 +1509,7 @@
(let ((m displayed-month)
(y displayed-year))
(calendar-increment-month m y -1)
- (dotimes (idummy 3)
+ (dotimes (_idummy 3)
(calendar-mark-month m y month day year color)
(calendar-increment-month m y 1)))))
=== modified file 'lisp/calendar/time-date.el'
--- a/lisp/calendar/time-date.el 2011-03-18 13:45:04 +0000
+++ b/lisp/calendar/time-date.el 2011-04-19 04:11:01 +0000
@@ -243,8 +243,6 @@
TIME should be a time value.
The Gregorian date Sunday, December 31, 1bce is imaginary."
(let* ((tim (decode-time time))
- (month (nth 4 tim))
- (day (nth 3 tim))
(year (nth 5 tim)))
(+ (time-to-day-in-year time) ; Days this year
(* 365 (1- year)) ; + Days in prior years
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103945: calendar housekeeping prompted by lexical-binding.,
Glenn Morris <=