unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* jit-lock doesn't honor font-lock-lines-before
@ 2005-08-28 13:08 martin rudalics
  2005-08-29  8:39 ` Richard M. Stallman
  2005-08-29 14:13 ` Stefan Monnier
  0 siblings, 2 replies; 18+ messages in thread
From: martin rudalics @ 2005-08-28 13:08 UTC (permalink / raw)


The customizable variable `font-lock-lines-before' is not honored by
jit-lock mode.  That's irritating since jit-lock is turned on by default
and other font-lock variables _are_ respected when jit-lock is active.

Below find two proposals:

(1) Preserve the current state of affairs and provide the appropriate
     hints in the doc-string:

(defcustom font-lock-lines-before 1
   "*Number of lines before the changed text to include in refontification.

This variable is not considered by `jit-lock-mode' and other Font lock
support modes."
   :type 'integer
   :group 'font-lock
   :version "22.1")

     and the Elisp manual (which doesn't mention jit-lock so far):

  -- Variable: font-lock-lines-before
      This variable specifies the number of extra lines to consider when
      refontifying the buffer after each text change.  Font lock begins
      refontifying from that number of lines before the changed region.
      The default is 1, but using a larger value can be useful for
      coping with multi-line patterns.  This variable is not considered
      by `jit-lock-mode' and other Font lock support modes.

(2) Modify `jit-lock-after-change' appropriately by, for example, inserting

        (forward-line (- font-lock-lines-before))

     before

        (setq start (line-beginning-position))

I prefer proposal (1).

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2005-09-03  9:07 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-28 13:08 jit-lock doesn't honor font-lock-lines-before martin rudalics
2005-08-29  8:39 ` Richard M. Stallman
2005-08-30  6:54   ` martin rudalics
2005-08-31  0:23     ` Richard M. Stallman
2005-09-01  6:22       ` martin rudalics
2005-09-01 14:11         ` Stefan Monnier
2005-09-02  5:24           ` martin rudalics
2005-09-02  6:04         ` Richard M. Stallman
2005-09-02 14:30           ` Stefan Monnier
2005-08-31 14:36     ` Richard M. Stallman
2005-08-29 14:13 ` Stefan Monnier
2005-08-30 12:11   ` martin rudalics
2005-08-31  2:47     ` Stefan Monnier
2005-09-01  6:24       ` martin rudalics
2005-09-01 13:49         ` Stefan Monnier
2005-09-02  6:05           ` Richard M. Stallman
2005-09-02 18:45             ` Stefan Monnier
2005-09-03  9:07               ` Richard M. Stallman

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).