Article View: comp.emacs
Article #3214Setting default TAB width?
From: Willis Elias
Date: Tue, 15 Dec 1992 22:57
Date: Tue, 15 Dec 1992 22:57
42 lines
2439 bytes
2439 bytes
I'm an emacs novice and have a pretty simple question. I'm using GNU
emacs (version?) on a Sun SparcStation. I'd like to know how I can set
the TAB character "width" to 4 spaces. I believe it defaults to 8
spaces when in text-mode. Although Lisp is totally foreign to me, I
have hacked-around in my .emacs file and tried the following:
(setq c-tab-always-indent nil)
(setq tab-width 4)
This first attempt doesn't seem to do anything. So I tried the
following:
(global-set-key " " (quote tab-to-tab-stop))
(edit-tab-stops)
This does the job, but in a really lame way: If I invoke emacs from an
X-Window without any file name argument, emacs starts up with the
edit-tab-stops buffer. I can then manually modify the tab stops, do a
C-c C-c to save the new tab stops, and start grabbing files and
editting away with the new tab stops in effect. If I invoke emacs from
an X-Window _with_ a file name argument, emacs loads the named file
into the current buffer on "top" of the edit-tab-stops buffer. So I
could change buffers to the tab stops buffer, modify tab stops, switch
buffers, edit file, etc...
This *works* but there must be a better, more automated way (something
like the first attempt maybe?).
Any suggestions would be appreciated.
==============================================================================
Willis Elias |The Aerospace Corporation, El Segundo, CA
310-336-8653 |
|"BACK OFF MAN!!
will@bigsky.aero.org | DON'T MAKE ME USE THIS!!" -Ren Hoek
==============================================================================
Fortune:
--------
A countryman between two lawyers is like a fish between two cats.
-- Ben Franklin
---------------------------------------------------------------------
Disclaimer: The previous fortune was generated randomly and, as such,
does not in any way reflect the social, political or religious views
of the sender.
Technical Details
Message-ID:
<1992Dec15.225753.20549@speedy.aero.org>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!usc!news.aero.org!speedy.aero.org!bigsky.Aero.ORG!willShow Full Headers
Complete Article Headers
Newsgroups: comp.emacs Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!usc!news.aero.org!speedy.aero.org!bigsky.Aero.ORG!will From: will@bigsky.Aero.ORG (Willis Elias) Subject: Setting default TAB width? Message-ID: <1992Dec15.225753.20549@speedy.aero.org> Sender: news@speedy.aero.org Nntp-Posting-Host: bigsky.aero.org Organization: The Aerospace Corporation; El Segundo, CA Date: Tue, 15 Dec 1992 22:57:53 GMT Lines: 42