From: Miles Bader <miles@lsi.nec.co.jp>
Cc: Eli Zaretskii <eliz@is.elta.co.il>,
"Alfred M. Szmidt" <ams@kemisten.nu>,
emacs-devel@gnu.org
Subject: Re: add-log.el: Indenting broken.
Date: 03 Dec 2002 11:55:45 +0900 [thread overview]
Message-ID: <buosmxfak0e.fsf@mcspd15.ucom.lsi.nec.co.jp> (raw)
In-Reply-To: <200212021610.gB2GAiZ02150@rum.cs.yale.edu>
"Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> 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
--
自らを空にして、心を開く時、道は開かれる
next prev parent reply other threads:[~2002-12-03 2:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-23 15:44 add-log.el: Indenting broken Alfred M. Szmidt
2002-11-26 23:52 ` Stefan Monnier
2002-11-27 6:30 ` Eli Zaretskii
2002-11-27 6:44 ` Miles Bader
2002-11-27 12:52 ` Alfred M. Szmidt
2002-11-28 1:50 ` Miles Bader
2002-11-28 6:12 ` Eli Zaretskii
2002-11-28 6:35 ` Miles Bader
2002-12-02 16:10 ` Stefan Monnier
2002-12-03 2:55 ` Miles Bader [this message]
2002-11-29 15:03 ` Richard Stallman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=buosmxfak0e.fsf@mcspd15.ucom.lsi.nec.co.jp \
--to=miles@lsi.nec.co.jp \
--cc=ams@kemisten.nu \
--cc=eliz@is.elta.co.il \
--cc=emacs-devel@gnu.org \
--cc=miles@gnu.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 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.