emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: jit-lock tries to fontify killed buffer (sometimes)


From: Andreas Schwab
Subject: Re: jit-lock tries to fontify killed buffer (sometimes)
Date: Fri, 05 Apr 2013 10:33:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Fabrice Popineau <address@hidden> 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, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]