From: Mattias EngdegÄrd Date: Tue, 30 Jul 2024 20:34:39 +0000 (+0200) Subject: vhdl-mode: don't use timer accessors in XEmacs X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f8fbb4c145d2ccff4268ce0ac8228bae020280d6;p=emacs.git 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. (cherry picked from commit b6c18817a259ec10df5bd741a6eef6842199e95b) --- diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 22706be6bb5..2c4b83bed23 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -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."