Commit c880af52 authored by Juanma Barranquero's avatar Juanma Barranquero
Browse files

lisp/emacs-lisp/timer.el (timer--time): Define setter with gv-define-setter.

parent 5660113b
2013-08-10 Juanma Barranquero <>
* emacs-lisp/timer.el (timer--time): Define setter with
gv-define-setter to avoid deprecation warning.
* completion.el: Remove stuff unused since revno:3176 (1993-05-27).
(*record-cmpl-statistics-p*): Remove (was commented out ).
(*record-cmpl-statistics-p*): Remove (was commented out).
(cmpl-statistics-block): Remove (body was commented out).
All callers changed.
(add-completions-from-buffer, load-completions-from-file):
......@@ -62,23 +62,22 @@
(timer--usecs timer)
(timer--psecs timer)))
(gv-define-simple-setter timer--time
(lambda (timer time)
(timer--check timer)
(setf (timer--high-seconds timer) (pop time))
(let ((low time) (usecs 0) (psecs 0))
(if (consp time)
(setq low (pop time))
(if time
(setq usecs (pop time))
(if time
(setq psecs (car time)))))))
(setf (timer--low-seconds timer) low)
(setf (timer--usecs timer) usecs)
(setf (timer--psecs timer) psecs))))
(gv-define-setter timer--time (time timer)
(macroexp-let2 nil val time
(timer--check ,timer)
(setf (timer--high-seconds ,timer) (pop ,val))
(let ((low ,val) (usecs 0) (psecs 0))
(when (consp ,val)
(setq low (pop ,val))
(when ,val
(setq usecs (pop ,val))
(when ,val
(setq psecs (car ,val)))))
(setf (timer--low-seconds ,timer) low)
(setf (timer--usecs ,timer) usecs)
(setf (timer--psecs ,timer) psecs))
(defun timer-set-time (timer time &optional delta)
"Set the trigger time of TIMER to TIME.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment