changeset 93329:6139daabcf5f

(calendar-cursor-to-nearest-date): Remove un-needed local `date'. (calendar-cursor-to-visible-date): Use let rather than let*. Remove un-needed local `first-of-month-weekday'.
author Glenn Morris <rgm@gnu.org>
date Fri, 28 Mar 2008 02:45:58 +0000
parents 15b0834c93df
children 1515466cea2b
files lisp/calendar/cal-move.el
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/cal-move.el	Fri Mar 28 02:45:39 2008 +0000
+++ b/lisp/calendar/cal-move.el	Fri Mar 28 02:45:58 2008 +0000
@@ -39,9 +39,8 @@
   "Move the cursor to the closest date.
 The position of the cursor is unchanged if it is already on a date.
 Returns the list (month day year) giving the cursor position."
-  (let ((date (calendar-cursor-to-date))
-        (column (current-column)))
-    (or date
+  (or (calendar-cursor-to-date)
+      (let ((column (current-column)))
         (when (> 3 (count-lines (point-min) (point)))
           (goto-line 3)
           (move-to-column column))
@@ -64,10 +63,9 @@
 ;;;###cal-autoload
 (defun calendar-cursor-to-visible-date (date)
   "Move the cursor to DATE that is on the screen."
-  (let* ((month (extract-calendar-month date))
-         (day (extract-calendar-day date))
-         (year (extract-calendar-year date))
-         (first-of-month-weekday (calendar-day-of-week (list month 1 year))))
+  (let ((month (extract-calendar-month date))
+        (day (extract-calendar-day date))
+        (year (extract-calendar-year date)))
     (goto-line (+ 3
                   (/ (+ day  -1
                         (mod