From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Karl Chen Newsgroups: gmane.emacs.devel Subject: BUG: indenting lisp code marks buffer as dirty when it shouldn't Date: Sun, 24 Nov 2002 03:02:33 -0800 Sender: emacs-devel-admin@gnu.org Message-ID: <15840.45513.721157.204137@quack.quarl.org> Reply-To: quarl@quarl.org NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1038135863 27509 80.91.224.249 (24 Nov 2002 11:04:23 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 24 Nov 2002 11:04:23 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18FuYn-00079X-00 for ; Sun, 24 Nov 2002 12:04:21 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18Fudt-0006Vt-00 for ; Sun, 24 Nov 2002 12:09:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18FuXl-00023E-00; Sun, 24 Nov 2002 06:03:17 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18FuX8-0001cG-00 for emacs-devel@gnu.org; Sun, 24 Nov 2002 06:02:38 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18FuX6-0001ZS-00 for emacs-devel@gnu.org; Sun, 24 Nov 2002 06:02:37 -0500 Original-Received: from [12.208.4.115] (helo=optimus-prime.quarl.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18FuX6-0001ZN-00 for emacs-devel@gnu.org; Sun, 24 Nov 2002 06:02:36 -0500 Original-Received: from quack.hfb.quarl.org ([192.168.2.2] helo=quack.quarl.org ident=mail) by optimus-prime.quarl.org with esmtp (Exim 3.35 #1 (Debian)) id 18FuX4-0007hs-00; Sun, 24 Nov 2002 03:02:34 -0800 Original-Received: from quarl by quack.quarl.org with local (Exim 3.36 #1 (Debian)) id 18FuX3-0004IG-00; Sun, 24 Nov 2002 03:02:33 -0800 Original-To: emacs-devel@gnu.org X-Mailer: VM 7.07.q1 under Emacs 21.3.50.5 X-Attribution: quarl X-Quack-Archive: 1 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:9642 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9642 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