all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* jit-lock.el
@ 2004-06-25 23:57 Richard Stallman
  2004-06-30 14:08 ` jit-lock.el Stefan
  2004-10-10  5:32 ` jit-lock.el Stefan
  0 siblings, 2 replies; 6+ messages in thread
From: Richard Stallman @ 2004-06-25 23:57 UTC (permalink / raw)


Is anyone investigating this bug report?

To: emacs-devel@gnu.org
From: Karl Chen <quarl@nospam.quarl.org>
Date: Tue, 22 Jun 2004 01:43:16 -0700
Subject: another jit-lock bug
Reply-To: quarl+dated+1088325557.3e362f@nospam.quarl.org
Sender: emacs-devel-bounces+rms=gnu.org@gnu.org


emacs -q

(global-set-key "\r" (lambda () (interactive) (newline)
(indent-according-to-mode)))
(global-font-lock-mode)
(setq font-lock-support-mode 'jit-lock-mode)

C-x C-f /tmp/a.sh

if true ; then
    # when you press return here, auto indent succeeds
fi

case z in
    asdf)
# auto indent fails here only when font-lock-support-mode is
# jit-lock-mode, using (indent-according-to-mode) as part of an # interactive key (if you manually evaluate # (indent-according-to-mode) it works)

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

* Re: jit-lock.el
  2004-06-25 23:57 jit-lock.el Richard Stallman
@ 2004-06-30 14:08 ` Stefan
  2004-07-01 17:14   ` jit-lock.el Richard Stallman
  2004-10-10  5:32 ` jit-lock.el Stefan
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan @ 2004-06-30 14:08 UTC (permalink / raw)
  Cc: emacs-devel

> Is anyone investigating this bug report?

I have just put it in my growing list of "bugs to investigate".
I'm still trying to catch up from my 3-weeks trip.


        Stefan


> To: emacs-devel@gnu.org
> From: Karl Chen <quarl@nospam.quarl.org>
> Date: Tue, 22 Jun 2004 01:43:16 -0700
> Subject: another jit-lock bug
> Reply-To: quarl+dated+1088325557.3e362f@nospam.quarl.org
> Sender: emacs-devel-bounces+rms=gnu.org@gnu.org


> emacs -q

> (global-set-key "\r" (lambda () (interactive) (newline)
> (indent-according-to-mode)))
> (global-font-lock-mode)
> (setq font-lock-support-mode 'jit-lock-mode)

> C-x C-f /tmp/a.sh

> if true ; then
>     # when you press return here, auto indent succeeds
> fi

> case z in
>     asdf)
> # auto indent fails here only when font-lock-support-mode is
> # jit-lock-mode, using (indent-according-to-mode) as part of an # interactive key (if you manually evaluate # (indent-according-to-mode) it works)



> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: jit-lock.el
  2004-06-30 14:08 ` jit-lock.el Stefan
@ 2004-07-01 17:14   ` Richard Stallman
  2004-07-01 17:51     ` jit-lock.el Stefan
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2004-07-01 17:14 UTC (permalink / raw)
  Cc: emacs-devel

    I have just put it in my growing list of "bugs to investigate".
    I'm still trying to catch up from my 3-weeks trip.

You didn't fix bugs during your trip?

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

* Re: jit-lock.el
  2004-07-01 17:14   ` jit-lock.el Richard Stallman
@ 2004-07-01 17:51     ` Stefan
  2004-07-01 20:59       ` jit-lock.el David Kastrup
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan @ 2004-07-01 17:51 UTC (permalink / raw)
  Cc: emacs-devel

>     I have just put it in my growing list of "bugs to investigate".
>     I'm still trying to catch up from my 3-weeks trip.
> You didn't fix bugs during your trip?

No, I didn't even have a computer.  ;-)
It was quite enjoyable,


        Stefan

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

* Re: jit-lock.el
  2004-07-01 17:51     ` jit-lock.el Stefan
@ 2004-07-01 20:59       ` David Kastrup
  0 siblings, 0 replies; 6+ messages in thread
From: David Kastrup @ 2004-07-01 20:59 UTC (permalink / raw)
  Cc: rms, emacs-devel

Stefan <monnier@iro.umontreal.ca> writes:

> >     I have just put it in my growing list of "bugs to investigate".
> >     I'm still trying to catch up from my 3-weeks trip.
> > You didn't fix bugs during your trip?
> 
> No, I didn't even have a computer.  ;-)

Oh, bugs can be annoying on a trip even without a computer.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: jit-lock.el
  2004-06-25 23:57 jit-lock.el Richard Stallman
  2004-06-30 14:08 ` jit-lock.el Stefan
@ 2004-10-10  5:32 ` Stefan
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan @ 2004-10-10  5:32 UTC (permalink / raw)
  Cc: Karl Chen, emacs-devel

> Is anyone investigating this bug report?

I just looked at it.

> To: emacs-devel@gnu.org
> From: Karl Chen <quarl@nospam.quarl.org>
> Date: Tue, 22 Jun 2004 01:43:16 -0700
> Subject: another jit-lock bug
> Reply-To: quarl+dated+1088325557.3e362f@nospam.quarl.org
> Sender: emacs-devel-bounces+rms=gnu.org@gnu.org


> emacs -q

> (global-set-key "\r" (lambda () (interactive) (newline)
> (indent-according-to-mode)))
> (global-font-lock-mode)
> (setq font-lock-support-mode 'jit-lock-mode)

> C-x C-f /tmp/a.sh

> if true ; then
>     # when you press return here, auto indent succeeds
> fi

> case z in
>     asdf)
> # auto indent fails here only when font-lock-support-mode is
> # jit-lock-mode, using (indent-according-to-mode) as part of an # interactive key (if you manually evaluate # (indent-according-to-mode) it works)

Here's what happens.  The `)' right after `asdf' has a syntax-table text
property of ".".  If you put point right after it and do (newline), the
newline you inset inherits the "." property.  That incorrect property is
removed next time font-lock is invoked, i.e. immediately (with
font-lock-support-mode) or after the current command is finished (without
font-lock-support-mode).  If you call indent-according-to-mode as part of
the same command, the indentation code gets confused by this transient
newline-with-punctuation-syntax.

I think the best solution is the one below.  Any objection?
I really can't think of any case where the syntax-table text-property should
be sticky, but it may just be a lack of imagination.


        Stefan


--- textprop.c	18 May 2004 10:10:08 -0400	1.138
+++ textprop.c	10 Oct 2004 01:23:30 -0400	
@@ -1,5 +1,5 @@
 /* Interface code for dealing with text properties.
-   Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003
+   Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004
    Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -2233,7 +2233,9 @@
 the character doesn't inherit PROPERTY if NONSTICKINESS is non-nil,
 inherits it if NONSTICKINESS is nil.  The front-sticky and
 rear-nonsticky properties of the character overrides NONSTICKINESS.  */);
-  Vtext_property_default_nonsticky = Qnil;
+  /* Text property `syntax-table' should be nonsticky by default.  */
+  Vtext_property_default_nonsticky
+    = Fcons (Fcons (intern ("syntax-table"), Qt), Qnil);
 
   staticpro (&interval_insert_behind_hooks);
   staticpro (&interval_insert_in_front_hooks);

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

end of thread, other threads:[~2004-10-10  5:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-25 23:57 jit-lock.el Richard Stallman
2004-06-30 14:08 ` jit-lock.el Stefan
2004-07-01 17:14   ` jit-lock.el Richard Stallman
2004-07-01 17:51     ` jit-lock.el Stefan
2004-07-01 20:59       ` jit-lock.el David Kastrup
2004-10-10  5:32 ` jit-lock.el Stefan

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.