diff options
| author | Glenn Morris | 2009-08-21 07:11:24 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-08-21 07:11:24 +0000 |
| commit | a8ab722f607b850b8dba6eb17674df18861f73d6 (patch) | |
| tree | 0f8511e27224bd5b53268b57fadf9e88591e9853 | |
| parent | d6261cc1a247d3cea98ecfe7bded7c5a05e47dbf (diff) | |
| download | emacs-a8ab722f607b850b8dba6eb17674df18861f73d6.tar.gz emacs-a8ab722f607b850b8dba6eb17674df18861f73d6.zip | |
(calendar-cursor-to-nearest-date, calendar-cursor-to-visible-date):
Use forward-line, not goto-line.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/calendar/cal-move.el | 18 |
2 files changed, 13 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 304a50c6850..fbab5bc818c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2009-08-21 Glenn Morris <rgm@gnu.org> | 1 | 2009-08-21 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * calendar/cal-move.el (calendar-cursor-to-nearest-date) | ||
| 4 | (calendar-cursor-to-visible-date): Use forward-line, not goto-line. | ||
| 5 | |||
| 3 | * mail/rmail.el (rmail-obsolete): Delete custom group. | 6 | * mail/rmail.el (rmail-obsolete): Delete custom group. |
| 4 | (rmail-pop-password, rmail-pop-password-required): Make into aliases. | 7 | (rmail-pop-password, rmail-pop-password-required): Make into aliases. |
| 5 | (rmail-remote-password, rmail-remote-password-required): | 8 | (rmail-remote-password, rmail-remote-password-required): |
diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el index 534e7c1ecc7..6433b71c382 100644 --- a/lisp/calendar/cal-move.el +++ b/lisp/calendar/cal-move.el | |||
| @@ -47,7 +47,8 @@ Returns the list (month day year) giving the cursor position." | |||
| 47 | (last (nth 2 edges)) | 47 | (last (nth 2 edges)) |
| 48 | (right (nth 3 edges))) | 48 | (right (nth 3 edges))) |
| 49 | (when (< (count-lines (point-min) (point)) calendar-first-date-row) | 49 | (when (< (count-lines (point-min) (point)) calendar-first-date-row) |
| 50 | (goto-line calendar-first-date-row) | 50 | (goto-char (point-min)) |
| 51 | (forward-line (1- calendar-first-date-row)) | ||
| 51 | (move-to-column col)) | 52 | (move-to-column col)) |
| 52 | ;; The date positions are fixed and computable, but searching | 53 | ;; The date positions are fixed and computable, but searching |
| 53 | ;; is probably more flexible. Need to consider blank days at | 54 | ;; is probably more flexible. Need to consider blank days at |
| @@ -76,13 +77,14 @@ Returns the list (month day year) giving the cursor position." | |||
| 76 | (let ((month (calendar-extract-month date)) | 77 | (let ((month (calendar-extract-month date)) |
| 77 | (day (calendar-extract-day date)) | 78 | (day (calendar-extract-day date)) |
| 78 | (year (calendar-extract-year date))) | 79 | (year (calendar-extract-year date))) |
| 79 | (goto-line (+ calendar-first-date-row | 80 | (goto-char (point-min)) |
| 80 | (/ (+ day -1 | 81 | (forward-line (+ calendar-first-date-row -1 |
| 81 | (mod | 82 | (/ (+ day -1 |
| 82 | (- (calendar-day-of-week (list month 1 year)) | 83 | (mod |
| 83 | calendar-week-start-day) | 84 | (- (calendar-day-of-week (list month 1 year)) |
| 84 | 7)) | 85 | calendar-week-start-day) |
| 85 | 7))) | 86 | 7)) |
| 87 | 7))) | ||
| 86 | (move-to-column (+ calendar-left-margin (1- calendar-day-digit-width) | 88 | (move-to-column (+ calendar-left-margin (1- calendar-day-digit-width) |
| 87 | (* calendar-month-width | 89 | (* calendar-month-width |
| 88 | (1+ (calendar-interval | 90 | (1+ (calendar-interval |