comparison lisp/calendar/cal-iso.el @ 93185:5a7437fafea3

(calendar-iso-read-date): New name for calendar-iso-read-args. Update callers, make old name an obsolete alias.
author Glenn Morris <rgm@gnu.org>
date Tue, 25 Mar 2008 03:41:39 +0000
parents d77fc175bcfc
children b3e69c64ac95
comparison
equal deleted inserted replaced
93184:63a7509590a7 93185:5a7437fafea3
92 "Show equivalent ISO date for the date under the cursor." 92 "Show equivalent ISO date for the date under the cursor."
93 (interactive) 93 (interactive)
94 (message "ISO date: %s" 94 (message "ISO date: %s"
95 (calendar-iso-date-string (calendar-cursor-to-date t)))) 95 (calendar-iso-date-string (calendar-cursor-to-date t))))
96 96
97 (defun calendar-iso-read-args (&optional dayflag) 97 (defun calendar-iso-read-date (&optional dayflag)
98 "Interactively read the arguments for an ISO date command. 98 "Interactively read the arguments for an ISO date command.
99 Reads a year and week, and if DAYFLAG is non-nil a day (otherwise 99 Reads a year and week, and if DAYFLAG is non-nil a day (otherwise
100 taken to be 1)." 100 taken to be 1)."
101 (let* ((year (calendar-read 101 (let* ((year (calendar-read
102 "ISO calendar year (>0): " 102 "ISO calendar year (>0): "
116 "ISO day (1-7): " 116 "ISO day (1-7): "
117 (lambda (x) (and (<= 1 x) (<= x 7)))) 117 (lambda (x) (and (<= 1 x) (<= x 7))))
118 1))) 118 1)))
119 (list (list week day year)))) 119 (list (list week day year))))
120 120
121 (define-obsolete-function-alias
122 'calendar-iso-read-args 'calendar-iso-read-date "23.1")
123
121 ;;;###cal-autoload 124 ;;;###cal-autoload
122 (defun calendar-goto-iso-date (date &optional noecho) 125 (defun calendar-goto-iso-date (date &optional noecho)
123 "Move cursor to ISO DATE; echo ISO date unless NOECHO is non-nil." 126 "Move cursor to ISO DATE; echo ISO date unless NOECHO is non-nil."
124 (interactive (calendar-iso-read-args t)) 127 (interactive (calendar-iso-read-date t))
125 (calendar-goto-date (calendar-gregorian-from-absolute 128 (calendar-goto-date (calendar-gregorian-from-absolute
126 (calendar-absolute-from-iso date))) 129 (calendar-absolute-from-iso date)))
127 (or noecho (calendar-print-iso-date))) 130 (or noecho (calendar-print-iso-date)))
128 131
129 ;;;###cal-autoload 132 ;;;###cal-autoload
130 (defun calendar-goto-iso-week (date &optional noecho) 133 (defun calendar-goto-iso-week (date &optional noecho)
131 "Move cursor to ISO DATE; echo ISO date unless NOECHO is non-nil. 134 "Move cursor to ISO DATE; echo ISO date unless NOECHO is non-nil.
132 Interactively, goes to the first day of the specified week." 135 Interactively, goes to the first day of the specified week."
133 (interactive (calendar-iso-read-args)) 136 (interactive (calendar-iso-read-date))
134 (calendar-goto-date (calendar-gregorian-from-absolute 137 (calendar-goto-date (calendar-gregorian-from-absolute
135 (calendar-absolute-from-iso date))) 138 (calendar-absolute-from-iso date)))
136 (or noecho (calendar-print-iso-date))) 139 (or noecho (calendar-print-iso-date)))
137 140
138 (defvar date) 141 (defvar date)