Mercurial > hg > xemacs-beta
comparison lisp/itimer.el @ 2303:0da64f4bd0bc
[xemacs-hg @ 2004-09-22 22:14:47 by james]
Do not uniquify names in set-itimer-name, as requested by Kyle.
author | james |
---|---|
date | Wed, 22 Sep 2004 22:14:51 +0000 |
parents | 13a418960a88 |
children | d8c340c9adb6 |
comparison
equal
deleted
inserted
replaced
2302:513db903b41a | 2303:0da64f4bd0bc |
---|---|
220 (check-itimer itimer) | 220 (check-itimer itimer) |
221 (nth 7 itimer)) | 221 (nth 7 itimer)) |
222 | 222 |
223 (defun set-itimer-name (itimer name) | 223 (defun set-itimer-name (itimer name) |
224 "Set the name of ITIMER to be NAME. | 224 "Set the name of ITIMER to be NAME. |
225 NAME is an identifier for the itimer. It must be a string. If an itimer | 225 NAME is an identifier for the itimer. It must be a string. If an active |
226 already exists with this name, NAME will be modified slightly to make it | 226 itimer already exists with this name, an error is signaled." |
227 unique." | |
228 (check-string name) | 227 (check-string name) |
229 (let ((oname name) | 228 (and (itimer-live-p itimer) |
230 (num 2)) | 229 (get-itimer name) |
231 (while (get-itimer name) | 230 (error "itimer named \"%s\" already existing and activated" name)) |
232 (setq name (format "%s<%d>" oname num)) | |
233 (itimer-increment num))) | |
234 (setcar itimer name)) | 231 (setcar itimer name)) |
235 | 232 |
236 (defun set-itimer-value (itimer value) | 233 (defun set-itimer-value (itimer value) |
237 "Set the timeout value of ITIMER to be VALUE. | 234 "Set the timeout value of ITIMER to be VALUE. |
238 Itimer will expire in this many seconds. | 235 Itimer will expire in this many seconds. |