From: Miles Bader <miles@lsi.nec.co.jp>
Cc: "Alfred M. Szmidt" <ams@kemisten.nu>, emacs-devel@gnu.org
Subject: Re: add-log.el: Indenting broken.
Date: 28 Nov 2002 15:35:10 +0900 [thread overview]
Message-ID: <buoel96kxr5.fsf@mcspd15.ucom.lsi.nec.co.jp> (raw)
In-Reply-To: <Pine.SUN.3.91.1021128081009.22888F-100000@is>
Eli Zaretskii <eliz@is.elta.co.il> writes:
> > What do you use the TAB key for in ChangeLog files?
>
> You didn't ask me, but I'll give my answer anyway: I use it to reindent
> the change log text, like I do in other modes.
Ok, now I see what's going on -- I didn't try TAB in enough places.
It works fine if you're _after_ some change-log text (because the
preceding text will basically always start with a tab), but it screws up
if you're directly after a change-log header.
Now I agree, the new behavior is annoying, because it doesn't do the
right thing at the left-margin.
Something like the following seems appropriate to me:
(defun change-log-indent ()
(interactive)
(let ((cur-indent (current-indentation)))
(cond ((> (current-column) cur-indent)
(insert ?\t))
((= cur-indent 8)
(move-to-column cur-indent))
(t
(delete-horizontal-space)
(indent-to-column 8)))))
(set (make-local-variable 'indent-line-function) 'change-log-indent)
-Miles
--
Run away! Run away!
next prev parent reply other threads:[~2002-11-28 6:35 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 [this message]
2002-12-02 16:10 ` Stefan Monnier
2002-12-03 2:55 ` Miles Bader
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
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=buoel96kxr5.fsf@mcspd15.ucom.lsi.nec.co.jp \
--to=miles@lsi.nec.co.jp \
--cc=ams@kemisten.nu \
--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 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).