[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tab questions
From: |
Umesh P Nair |
Subject: |
Re: Tab questions |
Date: |
12 Nov 2002 05:42:14 +0000 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
>>>>> On Mon, 11 Nov 2002 09:48:53 -0600, "ToddW" == Todd Wylie
>>>>> <twylie@watson.wustl.edu> said:
ToddW> Hi-
ToddW> I have a couple of questions about tab stops.
ToddW> 1: Is there a way to load edit-tab-stops from the .emacs file?
ToddW> Or must I M-x edit-tab-stops each session?
ToddW> 2: I'm not too clear on how tabs are working. If I
ToddW> edit-tab-stops from 8 characters to 5 for the first tab
ToddW> stop and then use C-f it will traverse all 5 spaces for the
ToddW> first tab stop -- however, it will jump all 8 spaces at the
ToddW> same time at the next (unedited) tab stop. Are edited tab
ToddW> stops akin to untabifying tabs (i.e. literal spaces)? I
ToddW> have the O'reilly GNU emacs book but his section isn't very
ToddW> helpful... thanks.
May not be the answer to your question, but I use the variable
tab-stop-list for this purpose.
The following crude function (wrote a while back. Never tried to make
it better.) sets the tab stops at places in the interval 2-120.
I have bound it to a key and a menu item.
(defun upn-set-tab-stops (spaces)
"Sets tab stops at fixed intervals."
(interactive "nSize of interval: ")
(if (or (< spaces 2) (> spaces 120))
(princ "Arg should be in the range 2-120" (active-minibuffer-window))
(setq tab-stop-list nil)
(let ((cur-column spaces))
(while (< cur-column 121)
(setq tab-stop-list (append tab-stop-list (list cur-column)))
(setq cur-column (+ cur-column spaces))))
(princ "Tab stops are set at " (active-minibuffer-window))
(pp tab-stop-list (active-minibuffer-window))))
- Umesh
--
----------------------------
Umesh P Nair
Remove 'z's from my email ID
----------------------------