all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
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.

      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

* 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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.