[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: text-mode tab questions
From: |
Kevin Rodgers |
Subject: |
Re: text-mode tab questions |
Date: |
Mon, 09 Sep 2002 11:51:28 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 |
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>