From f8fbb4c145d2ccff4268ce0ac8228bae020280d6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Tue, 30 Jul 2024 22:34:39 +0200 Subject: [PATCH] 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) --- lisp/progmodes/vhdl-mode.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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." -- 2.39.2