unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Fabrice Popineau <fabrice.popineau@supelec.fr>
Cc: emacs-devel@gnu.org
Subject: Re: jit-lock tries to fontify killed buffer (sometimes)
Date: Fri, 05 Apr 2013 10:33:47 +0200	[thread overview]
Message-ID: <m2ehepbclw.fsf@igel.home> (raw)
In-Reply-To: <loom.20130405T085134-104@post.gmane.org> (Fabrice Popineau's message of "Fri, 5 Apr 2013 06:56:12 +0000 (UTC)")

Fabrice Popineau <fabrice.popineau@supelec.fr> writes:

> --- \mirror\emacs\lisp\jit-lock.el      2013-02-08 16:13:02.417999000 +0100
> +++ \local\Emacs\lisp\jit-lock.el       2013-04-04 20:35:06.173203900 +0200
> @@ -35,7 +35,8 @@
>      (declare (debug t))
>      `(let ((inhibit-point-motion-hooks t))
>         (with-silent-modifications
> -         ,@body))))
> +         (if (buffer-live-p (current-buffer))
> +         ,@body)))))

That doesn't work if body contains more than one sexp (the first one
will be taken for the true condition, while the remaining are executed
iff it is false).  Use when instead of if.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



  reply	other threads:[~2013-04-05  8:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-05  6:56 jit-lock tries to fontify killed buffer (sometimes) Fabrice Popineau
2013-04-05  8:33 ` Andreas Schwab [this message]
2013-04-05  9:11   ` Fabrice Popineau
2013-04-05 13:24 ` Stefan Monnier
2013-04-09 13:15   ` Fabrice Popineau
2013-04-21 23:53     ` Fabrice Popineau

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=m2ehepbclw.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=emacs-devel@gnu.org \
    --cc=fabrice.popineau@supelec.fr \
    /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).