emacs-devel
[Top][All Lists]
Advanced

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

BUG: indenting lisp code marks buffer as dirty when it shouldn't


From: Karl Chen
Subject: BUG: indenting lisp code marks buffer as dirty when it shouldn't
Date: Sun, 24 Nov 2002 03:02:33 -0800

This bug exists in Emacs 21.2 as well as CVS HEAD 2002-11-23.

Synopsis:

  emacs -q

  C-space

  insert  "t ;; blah\n"          [ in scratch or any lisp buffer ]

  M-: (buffer-modified-tick)

  C-M-\                          [ or M-x indent-region ]

  M-: (buffer-modified-tick)


The buffer is not modified.  Thus the two `buffer-modified-tick's should
report the same value, but they don't. another way to test this is to save the
buffer before `indent-region', and see that `indent-region' makes the buffer
dirty, even though it ahsn't actually changed.

Emacs seems to be trying to move the ";;" to the same indentation level as
the rest of the code (which in this case would be the first column since
we're at top level), but there's text "blocking" it (the "t" in this case).

Pressing TAB on the "t ;; comment" line works fine (oesn't tick the buffer
modification).

Putting a double-semicolon comment after a line of code probably doesn't
follow GNU lisp coding style (I didn't write this myself anyway), but taht
shouldn't cause incorrect behavior when trying to indent it.

-- 
Karl Chen / address@hidden




reply via email to

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