# HG changeset patch # User Glenn Morris # Date 1206672358 0 # Node ID 6139daabcf5fc0ec167bd6091e4c5e6c8fc8d63b # Parent 15b0834c93df7e679f57ad4abc7266b48e841120 (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'. diff -r 15b0834c93df -r 6139daabcf5f lisp/calendar/cal-move.el --- 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