unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Karl Chen <quarl@hkn.eecs.berkeley.edu>
Subject: BUG: indenting lisp code marks buffer as dirty when it shouldn't
Date: Sun, 24 Nov 2002 03:02:33 -0800	[thread overview]
Message-ID: <15840.45513.721157.204137@quack.quarl.org> (raw)

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 / quarl@quarl.org

             reply	other threads:[~2002-11-24 11:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-24 11:02 Karl Chen [this message]
2002-11-24 11:09 ` BUG: indenting lisp code marks buffer as dirty when it shouldn't Karl Chen
2002-11-24 15:08 ` Kai Großjohann
2002-11-27 14:49   ` Francesco Potorti`
2002-11-25 12:36 ` Richard Stallman
2002-11-25 14:28 ` Stefan Monnier
2002-11-25 20:23   ` Karl Chen

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=15840.45513.721157.204137@quack.quarl.org \
    --to=quarl@hkn.eecs.berkeley.edu \
    --cc=quarl@quarl.org \
    /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).