unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <kevinr@ihs.com>
Subject: Re: text-mode tab questions
Date: Mon, 09 Sep 2002 11:51:28 -0600	[thread overview]
Message-ID: <3D7CDFA0.20902@ihs.com> (raw)
In-Reply-To: jb65xg3sgh.fsf@analog.net

mike hardy wrote:

> I use text-mode where the default binding for tab is indent-relative
> (according to Info).  But I only like indent-relative once (following
> <cr>) and would like to have tab key thereafter use tab-to-tab-stop to
> EOL.  Can this be done such that all I have to do is hit tab key and 'it'
> figures out when to go into tab-to-tab-stop mode?

(defadvice indent-relative (around last-command-tab-to-tab-stop activate)
  "If the last command was `indent-relative', run `tab-to-tab-stop' instead."
  (if (eq last-command 'indent-relative)	; this-command
      (call-interactively 'tab-to-tab-stop)
    ad-do-it))


> Also, I think I'd like to start using untabify on a text buffer when I
> save it.  How can I do this so that C-x C-s invokes that automatically so
> that I don't have to remember (or maybe there's already something to do
> this)?


Try setting write-contents-hooks (which see) within a text-mode-hook function.

-- 
Kevin Rodgers <kevinr@ihs.com>

  reply	other threads:[~2002-09-09 17:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-09  0:38 text-mode tab questions mike hardy
2002-09-09 17:51 ` Kevin Rodgers [this message]
2002-09-09 22:34   ` mike hardy
2002-09-10 16:18     ` Kevin Rodgers

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=3D7CDFA0.20902@ihs.com \
    --to=kevinr@ihs.com \
    /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.
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).