[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 210/352: Siirretään run-with-idle-timer-toiminto omaan funktioon
From: |
Stefan Monnier |
Subject: |
[elpa] 210/352: Siirretään run-with-idle-timer-toiminto omaan funktioonsa |
Date: |
Mon, 07 Jul 2014 14:04:11 +0000 |
monnier pushed a commit to branch master
in repository elpa.
commit a61d932500e406686acef7d037e27764359644ee
Author: Teemu Likonen <address@hidden>
Date: Sun Jan 2 10:45:52 2011 +0000
Siirretään run-with-idle-timer-toiminto omaan funktioonsa
---
wcheck-mode.el | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/wcheck-mode.el b/wcheck-mode.el
index ea945d6..2c9ab16 100644
--- a/wcheck-mode.el
+++ b/wcheck-mode.el
@@ -787,6 +787,12 @@ right-click mouse menu)."
(setq wcheck-timer nil)))
+(defun wcheck-funcall-after-idle (function &rest args)
+ (apply #'run-with-idle-timer
+ (+ wcheck-timer-idle (wcheck-current-idle-time-seconds))
+ nil function args))
+
+
(defun wcheck-timer-read-event ()
"Send windows' content to checker program or function.
@@ -828,13 +834,9 @@ marking strings in buffers."
;; Send strings to checker engine.
(wcheck-send-strings buffer strings)))
- ;; Start a timer which will mark text in buffers/windows.
- (run-with-idle-timer (+ wcheck-timer-idle
- (wcheck-current-idle-time-seconds))
- nil #'wcheck-timer-paint-event
- ;; Repeat the timer 3 times after the initial
- ;; call:
- 3))
+ ;; Start a timer which will mark text in buffers/windows. Repeat the
+ ;; timer 3 times after the initial call.
+ (wcheck-funcall-after-idle #'wcheck-timer-paint-event 3))
(defun wcheck-send-strings (buffer strings)
@@ -917,10 +919,7 @@ call. The delay between consecutive calls is defined in
variable
;; waiting wcheck-timer-idle. Pass REPEAT minus one as the argument.
(when (and (integerp repeat)
(> repeat 0))
- (run-with-idle-timer (+ wcheck-timer-idle
- (wcheck-current-idle-time-seconds))
- nil #'wcheck-timer-paint-event
- (1- repeat))))
+ (wcheck-funcall-after-idle #'wcheck-timer-paint-event (1- repeat))))
;;; Hooks
- [elpa] 307/352: Add "URL" header which points to GitHub, (continued)
- [elpa] 307/352: Add "URL" header which points to GitHub, Stefan Monnier, 2014/07/07
- [elpa] 322/352: Add Makefile to the repository, Stefan Monnier, 2014/07/07
- [elpa] 310/352: Update README.org url in doc string, Stefan Monnier, 2014/07/07
- [elpa] 159/352: Täydennetään funktioiden kuvauksia, Stefan Monnier, 2014/07/07
- [elpa] 275/352: Remove a duplicate sentence from wcheck-language-data doc, Stefan Monnier, 2014/07/07
- [elpa] 167/352: Vaihdetaan näppäimenlukufunktiota read-char-exclusive -> read-key, Stefan Monnier, 2014/07/07
- [elpa] 168/352: Dokumenttien kielellistä hienosäätöä, Stefan Monnier, 2014/07/07
- [elpa] 340/352: Makefile: Only byte-compile wcheck-mode.el, Stefan Monnier, 2014/07/07
- [elpa] 337/352: Use jit-lock-fontify-now instead of font-lock-fontify-region, Stefan Monnier, 2014/07/07
- [elpa] 306/352: Rephrase references to non-existing functions in README, Stefan Monnier, 2014/07/07
- [elpa] 210/352: Siirretään run-with-idle-timer-toiminto omaan funktioonsa,
Stefan Monnier <=
- [elpa] 344/352: Update copyright year to 2014, Stefan Monnier, 2014/07/07
- [elpa] 169/352: Varmempi tapa tutkia, onko hiirivalikko käytössä, Stefan Monnier, 2014/07/07
- [elpa] 339/352: Makefile: add rules to make *.elc files (byte-compile), Stefan Monnier, 2014/07/07
- [elpa] 327/352: Convert README to Markdown markup (and rename: .org -> .md), Stefan Monnier, 2014/07/07
- [elpa] 163/352: Tallennetaan täsmäystiedot jäsenninfunktion kutsumisen ajaksi, Stefan Monnier, 2014/07/07
- [elpa] 176/352: Tarkennetaan Ispell-tulosteen käsittelyä, Stefan Monnier, 2014/07/07
- [elpa] 148/352: Käytetään matalan tason customize-tyyppejä wcheck-language-data'ssa, Stefan Monnier, 2014/07/07
- [elpa] 342/352: Add pointer to Melpa package archive, Stefan Monnier, 2014/07/07
- [elpa] 266/352: Add an explicit OPERATION-MODE "nil" in README's examples, Stefan Monnier, 2014/07/07
- [elpa] 202/352: Abstrahoidaan read-key-toiminto funktioon wcheck-read-key, Stefan Monnier, 2014/07/07