From 3e0e034bb592c95601d26fafaf382e85b8be7689 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 28 Mar 2008 02:45:58 +0000 Subject: [PATCH] (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'. --- lisp/calendar/cal-move.el | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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 -- 2.39.5