vhdl-mode: don't use timer accessors in XEmacs

* lisp/progmodes/vhdl-mode.el (vhdl-run-when-idle):
No need to activate a newly created idle timer; keep it as
compatibility (or voodoo) code for XEmacs which probably doesn't have
the timer accessors anyway.
This commit is contained in:
Mattias Engdegård 2024-07-30 22:34:39 +02:00
parent a8ac8650ab
commit b6c18817a2

View file

@ -2341,7 +2341,8 @@ Ignore byte-compiler warnings you might see."
(if (fboundp 'start-itimer)
(start-itimer "vhdl-mode" function secs repeat t)
;; explicitly activate timer (necessary when Emacs is already idle)
(setf (timer--triggered (run-with-idle-timer secs repeat function)) nil)))
(when (featurep 'xemacs)
(aset (run-with-idle-timer secs repeat function) 0 nil))))
(defun vhdl-warning-when-idle (&rest args)
"Wait until idle, then print out warning STRING and beep."