comparison lisp/calendar/calendar.el @ 7132:1842a026e270

(calendar-starred-day): Var renamed from starred-day.
author Richard M. Stallman <rms@gnu.org>
date Wed, 27 Apr 1994 08:38:11 +0000
parents bcd548b4921d
children ce1457fb5ea4
comparison
equal deleted inserted replaced
7131:32678633292e 7132:1842a026e270
1984 year)) 1984 year))
1985 (if (and (looking-at "\\*") 1985 (if (and (looking-at "\\*")
1986 (save-excursion 1986 (save-excursion
1987 (re-search-backward "[^*]") 1987 (re-search-backward "[^*]")
1988 (looking-at ".\\*\\*"))) 1988 (looking-at ".\\*\\*")))
1989 (list month starred-day year) 1989 (list month calendar-starred-day year)
1990 (if error (error "Cursor is not on a date!")))))) 1990 (if error (error "Cursor is not on a date!"))))))
1991 1991
1992 (defun calendar-cursor-to-nearest-date () 1992 (defun calendar-cursor-to-nearest-date ()
1993 "Move the cursor to the closest date. 1993 "Move the cursor to the closest date.
1994 The position of the cursor is unchanged if it is already on a date. 1994 The position of the cursor is unchanged if it is already on a date.
2572 (defun calendar-star-date () 2572 (defun calendar-star-date ()
2573 "Replace the date under the cursor in the calendar window with asterisks. 2573 "Replace the date under the cursor in the calendar window with asterisks.
2574 This function can be used with the today-visible-calendar-hook run after the 2574 This function can be used with the today-visible-calendar-hook run after the
2575 calendar window has been prepared." 2575 calendar window has been prepared."
2576 (let ((buffer-read-only nil)) 2576 (let ((buffer-read-only nil))
2577 (make-variable-buffer-local 'starred-day) 2577 (make-variable-buffer-local 'calendar-starred-day)
2578 (forward-char 1) 2578 (forward-char 1)
2579 (setq starred-day 2579 (setq calendar-starred-day
2580 (string-to-int 2580 (string-to-int
2581 (buffer-substring (point) (- (point) 2)))) 2581 (buffer-substring (point) (- (point) 2))))
2582 (delete-char -2) 2582 (delete-char -2)
2583 (insert "**") 2583 (insert "**")
2584 (backward-char 1) 2584 (backward-char 1)