From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: add-log.el: Indenting broken. Date: 03 Dec 2002 11:55:45 +0900 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200212021610.gB2GAiZ02150@rum.cs.yale.edu> Reply-To: Miles Bader NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp X-Trace: main.gmane.org 1038884351 13278 80.91.224.249 (3 Dec 2002 02:59:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 3 Dec 2002 02:59:11 +0000 (UTC) Cc: Eli Zaretskii , "Alfred M. Szmidt" , emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18J3HC-0003S2-00 for ; Tue, 03 Dec 2002 03:59:10 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18J3QU-0004pE-00 for ; Tue, 03 Dec 2002 04:08:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18J3FA-0006Vp-00; Mon, 02 Dec 2002 21:57:04 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18J3Ei-0006Qo-00 for emacs-devel@gnu.org; Mon, 02 Dec 2002 21:56:36 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18J3Eh-0006Qd-00 for emacs-devel@gnu.org; Mon, 02 Dec 2002 21:56:36 -0500 Original-Received: from tyo201.gate.nec.co.jp ([210.143.35.51]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18J3Eg-0006QW-00; Mon, 02 Dec 2002 21:56:34 -0500 Original-Received: from mailgate4.nec.co.jp ([10.7.69.197]) by TYO201.gate.nec.co.jp (8.11.6/3.7W01080315) with ESMTP id gB32u7i01299; Tue, 3 Dec 2002 11:56:07 +0900 (JST) Original-Received: from mailsv4.nec.co.jp (mailgate51.nec.co.jp [10.7.69.190]) by mailgate4.nec.co.jp (8.11.6/3.7W-MAILGATE-NEC) with ESMTP id gB32u6q02330; Tue, 3 Dec 2002 11:56:06 +0900 (JST) Original-Received: from mcsss2.ucom.lsi.nec.co.jp ([10.30.114.133]) by mailsv4.nec.co.jp (8.11.6/3.7W-MAILSV4-NEC) with ESMTP id gB32tvq29350; Tue, 3 Dec 2002 11:55:58 +0900 (JST) Original-Received: from mcspd15.ucom.lsi.nec.co.jp (mcspd15 [10.30.114.174]) by mcsss2.ucom.lsi.nec.co.jp (8.10.2+Sun/3.7Wlsi_mx_6.0) with ESMTP id gB32tjB14393; Tue, 3 Dec 2002 11:55:45 +0900 (JST) Original-Received: by mcspd15.ucom.lsi.nec.co.jp (Postfix, from userid 31295) id 3A8F9370E; Tue, 3 Dec 2002 11:55:45 +0900 (JST) Original-To: "Stefan Monnier" System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: <200212021610.gB2GAiZ02150@rum.cs.yale.edu> Original-Lines: 36 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:9818 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9818 "Stefan Monnier" writes: > > Now I agree, the new behavior is annoying, because it doesn't do the > > right thing at the left-margin. > > I've restored it to what it was originally. Your change seems like the right thing, but I noticed that `indent-for-tab-command' actually does something stupid in this case: (defun indent-for-tab-command (&optional arg) ... (cond ((or ;; indent-to-left-margin is only meant for indenting, ;; so we force it to always insert a tab here. (eq indent-line-function 'indent-to-left-margin) ... (insert-tab arg)) It seems to me that this special case should only apply if point is not within the left margin, so that doing `C-a TAB' will always have the effect of `fixing' the current indentation (rather than just inserting a tab), and won't modify the buffer if the indentation for the line is already correct. So perhaps a better test might be: (and (eq indent-line-function 'indent-to-left-margin) (< (current-column) left-margin)) [I don't like the special-casing in `indent-for-tab-command' at all, and would actually rather remove it, but it's already that way so I'm trying to be conservative.] -Miles -- 自らを空にして、心を開く時、道は開かれる