* Setting c-basic-offset equal to tab-width
@ 2005-12-07 19:58 joseph.wakeling
2005-12-07 23:44 ` Edward O'Connor
0 siblings, 1 reply; 2+ messages in thread
From: joseph.wakeling @ 2005-12-07 19:58 UTC (permalink / raw)
Hello all,
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?
Many thanks,
-- Joe
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Setting c-basic-offset equal to tab-width
2005-12-07 19:58 Setting c-basic-offset equal to tab-width joseph.wakeling
@ 2005-12-07 23:44 ` Edward O'Connor
0 siblings, 0 replies; 2+ messages in thread
From: Edward O'Connor @ 2005-12-07 23:44 UTC (permalink / raw)
> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-12-07 23:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-07 19:58 Setting c-basic-offset equal to tab-width joseph.wakeling
2005-12-07 23:44 ` Edward O'Connor
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.