From: Edward O'Connor <hober0@gmail.com>
Subject: Re: Setting c-basic-offset equal to tab-width
Date: Wed, 07 Dec 2005 15:44:55 -0800 [thread overview]
Message-ID: <m21x0o8oaw.fsf@roisin.local> (raw)
In-Reply-To: 1133985507.458841.244470@g14g2000cwa.googlegroups.com
> Is there a way of setting c-basic-offset to be identical to tab-width,
> so that whenever the latter is changed, the former changes too?
With Emacs from CVS, you could use `defvaralias' to accomplish this:
,----[ C-h f defvaralias RET ]
| defvaralias is a built-in function in `C source code'.
| (defvaralias NEW-ALIAS BASE-VARIABLE &optional DOCSTRING)
|
| Make NEW-ALIAS a variable alias for symbol BASE-VARIABLE.
| Setting the value of NEW-ALIAS will subsequently set the value of BASE-VARIABLE,
| and getting the value of NEW-ALIAS will return the value BASE-VARIABLE has.
| Third arg DOCSTRING, if non-nil, is documentation for NEW-ALIAS. If it is
| omitted or nil, NEW-ALIAS gets the documentation string of BASE-VARIABLE,
| or of the variable at the end of the chain of aliases, if BASE-VARIABLE is
| itself an alias.
| The return value is BASE-VARIABLE.
|
| [back]
`----
So something like the following would do this (on CVS Emacs):
(defvaralias 'c-basic-offset 'tab-width)
HTH.
Ted
--
Edward O'Connor
hober0@gmail.com
Ense petit placidam sub libertate quietem.
prev parent reply other threads:[~2005-12-07 23:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-07 19:58 Setting c-basic-offset equal to tab-width joseph.wakeling
2005-12-07 23:44 ` Edward O'Connor [this message]
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=m21x0o8oaw.fsf@roisin.local \
--to=hober0@gmail.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).