From: Glenn Morris Date: Fri, 28 Mar 2008 02:45:58 +0000 (+0000) Subject: (calendar-cursor-to-nearest-date): Remove un-needed local `date'. X-Git-Tag: emacs-pretest-23.0.90~6847 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3e0e034bb592c95601d26fafaf382e85b8be7689;p=emacs.git (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 --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el index 2aef750db68..8c43c1a47fe 100644 --- a/lisp/calendar/cal-move.el +++ b/lisp/calendar/cal-move.el @@ -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