]> git.eshelyaron.com Git - emacs.git/commitdiff
vhdl-mode: don't use timer accessors in XEmacs
authorMattias EngdegÄrd <mattiase@acm.org>
Tue, 30 Jul 2024 20:34:39 +0000 (22:34 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 31 Jul 2024 14:32:53 +0000 (16:32 +0200)
* 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

index 22706be6bb57e212916899a7dbb297abd1d1a013..2c4b83bed239e0eb912dff35b78e7cf32eeb6f75 100644 (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."