]> code.delx.au - gnu-emacs/commitdiff
(calendar-cursor-to-nearest-date): Remove un-needed local `date'.
authorGlenn Morris <rgm@gnu.org>
Fri, 28 Mar 2008 02:45:58 +0000 (02:45 +0000)
committerGlenn Morris <rgm@gnu.org>
Fri, 28 Mar 2008 02:45:58 +0000 (02:45 +0000)
(calendar-cursor-to-visible-date): Use let rather than let*.
Remove un-needed local `first-of-month-weekday'.

lisp/calendar/cal-move.el

index 2aef750db684deab4829c2658f4166c48c16fc23..8c43c1a47fe5203013187a9b3770fa78b7a923a7 100644 (file)
@@ -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 @@ Returns the list (month day year) giving the cursor position."
 ;;;###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