diff --git a/vala-mode.el b/vala-mode.el index 0358790..d125540 100644 --- a/vala-mode.el +++ b/vala-mode.el @@ -3,8 +3,9 @@ ;; Author: 2005 Dylan R. E. Moonfire ;; 2008 Étienne BERSAC ;; Maintainer: Étienne BERSAC +;; Modifier: Kentaro NAKAZAWA ;; Created: 2008 May the 4th -;; Modified: May 2008 +;; Modified: April 2011 ;; Version: 0.1 ;; Keywords: vala languages oop @@ -194,9 +195,9 @@ (c-lang-defconst c-operators vala `((prefix "base"))) -;; Vala directives ? -;; (c-lang-defconst c-opt-cpp-prefix -;; csharp "^\\s *#.*") +;; Vala directives +(c-lang-defconst c-opt-cpp-prefix + vala "\\s *#\\s *") ;; Vala uses the following assignment operators @@ -206,7 +207,9 @@ ;; This defines the primative types for Vala (c-lang-defconst c-primitive-type-kwds - vala '("void" "char" "int" "float" "double" "string")) + vala '("void" "bool" "char" "uchar" "short" "ushort" "int" "uint" "long" "ulong" + "size_t" "ssize_t" "int8" "uint8" "int16" "uint16" "int32" "uint32" "int64" "uint64" + "unichar" "float" "double" "string")) ;; The keywords that define that the following is a type, such as a ;; class definition. @@ -227,7 +230,7 @@ vala '("public" "partial" "private" "const" "abstract" "protected" "ref" "in" "out" "static" "virtual" "override" "params" "internal" "weak" "owned" - "unowned")) + "unowned" "async" "yield")) ;; We don't use the protection level stuff because it breaks the ;; method indenting. Not sure why, though. @@ -277,7 +280,7 @@ ;; We need to treat namespace as an outer block to class indenting ;; works properly. (c-lang-defconst c-other-block-decl-kwds - vala '("namespace")) + vala '("namespace" "extern")) ;; We need to include the "in" for the foreach (c-lang-defconst c-other-kwds @@ -289,9 +292,9 @@ vala 'c-awk-at-vsemi-p) -(defcustom vala-font-lock-extra-types nil - "*List of extra types (aside from the type keywords) to recognize in Vala mode. -Each list item should be a regexp matching a single identifier.") +;; (defcustom vala-font-lock-extra-types nil +;; "*List of extra types (aside from the type keywords) to recognize in Vala mode. +;; Each list item should be a regexp matching a single identifier.") (defconst vala-font-lock-keywords-1 (c-lang-const c-matchers-1 vala) "Minimal highlighting for Vala mode.") diff --git a/vala.spec b/vala.spec index 000dcbc..fbf69ce 100644 --- a/vala.spec +++ b/vala.spec @@ -2,7 +2,7 @@ Name: vala Version: 0.16.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A modern programming language for GNOME Group: Development/Languages @@ -36,8 +36,8 @@ BuildRequires: emacs emacs-el %global vala_manpages valac %global vala_tools_binaries vala-gen-introspect vapicheck vapigen %global vala_tools_manpages vala-gen-introspect vapigen -Requires(post): %{_sbindir}/update-alternatives -Requires(postun): %{_sbindir}/update-alternatives +Requires(posttrans): %{_sbindir}/update-alternatives +Requires(preun): %{_sbindir}/update-alternatives %description @@ -194,7 +194,7 @@ rm -rf $RPM_BUILD_ROOT %endif -%post +%posttrans /sbin/ldconfig for f in %{vala_binaries}; do @@ -207,7 +207,7 @@ do $f.1.gz %{_mandir}/man1/$f-%{api_ver}.1.gz 90 done -%post tools +%posttrans tools for f in %{vala_tools_binaries}; do %{_sbindir}/update-alternatives --install %{_bindir}/$f \ @@ -219,36 +219,30 @@ do $f.1.gz %{_mandir}/man1/$f-%{api_ver}.1.gz 90 done -%postun +%preun /sbin/ldconfig -if [ $1 -eq 0 ]; -then - for f in %{vala_binaries}; - do - %{_sbindir}/update-alternatives --remove $f \ - %{_bindir}/$f-%{api_ver} - done - for f in %{vala_manpages}; - do - %{_sbindir}/update-alternatives --remove $f.1.gz \ - %{_mandir}/man1/$f-%{api_ver}.1.gz - done -fi +for f in %{vala_binaries}; +do + %{_sbindir}/update-alternatives --remove $f \ + %{_bindir}/$f-%{api_ver} +done +for f in %{vala_manpages}; +do + %{_sbindir}/update-alternatives --remove $f.1.gz \ + %{_mandir}/man1/$f-%{api_ver}.1.gz +done -%postun tools -if [ $1 -eq 0 ]; -then - for f in %{vala_tools_binaries}; - do - %{_sbindir}/update-alternatives --remove $f \ - %{_bindir}/$f-%{api_ver} - done - for f in %{vala_tools_manpages}; - do - %{_sbindir}/update-alternatives --remove $f.1.gz \ - %{_mandir}/man1/$f-%{api_ver}.1.gz - done -fi +%preun tools +for f in %{vala_tools_binaries}; +do + %{_sbindir}/update-alternatives --remove $f \ + %{_bindir}/$f-%{api_ver} +done +for f in %{vala_tools_manpages}; +do + %{_sbindir}/update-alternatives --remove $f.1.gz \ + %{_mandir}/man1/$f-%{api_ver}.1.gz +done %files @@ -308,6 +302,10 @@ fi %changelog +* Thu Apr 5 2012 Michel Salim - 0.16.0-2 +- Update vala-mode.el to April 2011 release +- Fix registration of Vala alternatives + * Wed Apr 04 2012 Kalev Lember - 0.16.0-1 - Update to 0.16.0