[slime-cvs] CVS update: slime/slime.el
Helmut Eller
heller at common-lisp.net
Wed Mar 16 21:58:58 UTC 2005
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv16641
Modified Files:
slime.el
Log Message:
(slime-run-when-idle): New function to hide Emacs/XEmacs differences.
See Steven E. Harris' message from 15 Mar 2005.
(slime-process-available-input): Use it.
Date: Wed Mar 16 22:58:57 2005
Author: heller
Index: slime/slime.el
diff -u slime/slime.el:1.471 slime/slime.el:1.472
--- slime/slime.el:1.471 Sun Mar 13 20:39:15 2005
+++ slime/slime.el Wed Mar 16 22:58:55 2005
@@ -1595,6 +1595,12 @@
(insert string))
(slime-process-available-input)))
+(defun slime-run-when-idle (function)
+ "Call FUNCTION as soon as Emacs is idle."
+ (run-at-time (if (featurep 'xemacs) itimer-short-interval 0)
+ nil
+ function))
+
(defun slime-process-available-input ()
"Process all complete messages that have arrived from Lisp."
(unwind-protect
@@ -1615,7 +1621,7 @@
(dolist (p slime-net-processes)
(with-current-buffer (process-buffer p)
(when (slime-net-have-input-p)
- (run-at-time 0 nil 'slime-process-available-input))))))
+ (slime-run-when-idle 'slime-process-available-input))))))
(defun slime-net-have-input-p ()
"Return true if a complete message is available."
@@ -4552,8 +4558,7 @@
(slime-completion-window-active-p))
;; XEmacs does not allow us to restore a window configuration from
;; pre-command-hook, so we do it asynchronously.
- (run-at-time
- 0 nil
+ (slime-run-when-idle
(lambda ()
(save-excursion
(set-window-configuration
More information about the slime-cvs
mailing list