unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: rudalics@gmx.at, cyd@stupidchicken.com, rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Nested sit-for's
Date: Mon, 21 Aug 2006 12:14:18 -0400	[thread overview]
Message-ID: <87r6zaf4ym.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m38xliqpml.fsf@kfs-l.imdomain.dk> (Kim F. Storm's message of "Mon, 21 Aug 2006 13:45:06 +0200")

>> IIUC, the recent addition of current-idle-time by RMS was supposed to
>> fix the sit-for in jit-lock problem in a different way.  But so far,
>> RMS' changes to jit-lock have not been installed...   What's up???
>> 
>> Someone else proposed a different change to the same part of jit-lock,
>> and I have not had time (while sufficiently alert) to study that,
>> so I don't have any idea which solution is better.
>> 
>> I sent my changes to the list yesterday; what do others think about
>> them?

> I haven't fully understood either of the two approaches, but Martin's
> approach which completely avoids using sit-for in the timer handler
> looks vastly superior to me for that reason alone!

I think we could clean up the code even more by extending
run-with-idle-timer as follows:

  (run-with-idle-timer SECS REPEAT FUNCTION &rest ARGS)

   Perform an action the next time Emacs is idle for SECS seconds.
   The action is to call function with arguments ARGS.
   SECS may be an integer or a floating point number.

   If REPEAT is non-nil, do the action each time Emacs has been idle for
   exactly SECS seconds (that is, only once for each time Emacs becomes idle).

   Additionally, if REPEAT is a number, repeat the action every REPEAT
   seconds as long as Emacs stays idle.

   This function returns a timer object which you can use in `cancel-timer'.


-- Stefan

  reply	other threads:[~2006-08-21 16:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1GD2sr-0005PH-UP@savannah.gnu.org>
     [not found] ` <m3bqqlka7e.fsf@kfs-l.imdomain.dk>
     [not found]   ` <87y7tp90i1.fsf@stupidchicken.com>
2006-08-16  8:14     ` Nested sit-for's Kim F. Storm
2006-08-16 19:08       ` Chong Yidong
2006-08-17  6:02       ` Richard Stallman
2006-08-17 11:15         ` Kim F. Storm
2006-08-17 14:02           ` David Kastrup
2006-08-18 15:47             ` Richard Stallman
2006-08-17 14:14           ` Chong Yidong
2006-08-17 15:09             ` Kim F. Storm
2006-08-17 17:21               ` Chong Yidong
2006-08-17 21:28                 ` Kim F. Storm
2006-08-17 22:42                   ` Chong Yidong
2006-08-17 16:05             ` martin rudalics
2006-08-17 21:33               ` Kim F. Storm
2006-08-18  9:03                 ` martin rudalics
2006-08-18  9:26                   ` Kim F. Storm
2006-08-20 13:54                     ` Chong Yidong
2006-08-20 21:05                       ` Kim F. Storm
2006-08-20 21:52                         ` martin rudalics
2006-08-20 22:05                           ` Kim F. Storm
2006-08-21 11:13                         ` Richard Stallman
2006-08-21 11:45                           ` Kim F. Storm
2006-08-21 16:14                             ` Stefan Monnier [this message]
2006-08-21 17:18                               ` martin rudalics
2006-08-22  1:40                                 ` Stefan Monnier
2006-08-22  7:42                               ` Richard Stallman
2006-08-17 14:21         ` Chong Yidong
2006-08-18 15:47           ` Richard Stallman
2007-10-17 14:41             ` Juanma Barranquero
2007-10-18  5:02               ` Richard Stallman
2007-10-18  7:40                 ` Juanma Barranquero
2007-10-23  7:13                   ` Richard Stallman
2006-08-17 15:33         ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r6zaf4ym.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).