Re: [Vala] Emacs vala-mode
- From: Evan Nemerson <evan coeus-group com>
- To: David Gomes <david elementaryos org>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Emacs vala-mode
- Date: Thu, 23 Aug 2012 17:56:32 -0700
On Thu, 2012-08-23 at 20:16 +0100, David Gomes wrote:
Ah, good point. Then how do you suggest we make it so that the user
configures it on init.el?
Just using defvar instead of setq for indent-tabs-mode, c-basic-offset,
and tab-width should be enough to prevent it from overriding an existing
value.
Unfortunately something is still setting c-basic-offset for me, but that
may be a local problem (I may be missing something, but I don't see
anything in vala-mode.el which would cause that).
Note that, even with the existing code, something like this should still
work:
(defun my-valastuff ()
(setq indent-tabs-mode nil
c-basic-offset 2
tab-width 2))
(add-hook 'vala-mode-hook 'my-valastuff)
On Thu, Aug 23, 2012 at 8:16 PM, Stefan Risberg <steffenomak gmail com>wrote:
Yes but with your patch it will *force* spaces. I myself like tabs for
indentation and spaces for aligment, but thats my preference.
Stefan
On Thu, Aug 23, 2012 at 08:05:56PM +0100, David Gomes wrote:
(setq indent-tabs-mode nil) will *not* work on default vala-mode.
Vala-mode
*forces* tabs.
On Thu, Aug 23, 2012 at 8:04 PM, Evan Nemerson <evan coeus-group com>
wrote:
On Thu, 2012-08-23 at 19:19 +0100, David Gomes wrote:
Vala's official indentation method is 4 spaces. However, vala-mode on
[citation needed]. The closest thing to an official statement on the
matter that I'm aware of is the valac source code, which uses tabs.
Vala's website is made it so that Emacs indents with tabs. Attached
is a
fixed version of that vala-mode.el to make it indent with spaces.
It's really a personal, or per-project, preference. People who want
spaces can use their ~/.emacs to (setq indent-tabs-mode nil) to do so.
I do (I prefer two spaces).
You could also use file variables to set this on a per-file basis, or
directory variables (see
http://www.emacswiki.org/emacs/DirectoryVariables) to set it for an
entire project.
I think it should be replaced on Vala's (live.gnome) website.
I don't think it should be unless you can cite your source for the
"official indentation method" statement, but it /is/ a wiki...
-Evan
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]