- Update vala-mode.el to April 2011 release

- Fix registration of Vala alternatives
This commit is contained in:
Michel Alexandre Salim 2012-04-06 00:23:13 +07:00
parent 8e292a298d
commit 9c9fa050d0
2 changed files with 44 additions and 43 deletions

View File

@ -3,8 +3,9 @@
;; Author: 2005 Dylan R. E. Moonfire ;; Author: 2005 Dylan R. E. Moonfire
;; 2008 Étienne BERSAC ;; 2008 Étienne BERSAC
;; Maintainer: Étienne BERSAC <bersace03@laposte.net> ;; Maintainer: Étienne BERSAC <bersace03@laposte.net>
;; Modifier: Kentaro NAKAZAWA <kentaro.nakazawa@nifty.com>
;; Created: 2008 May the 4th ;; Created: 2008 May the 4th
;; Modified: May 2008 ;; Modified: April 2011
;; Version: 0.1 ;; Version: 0.1
;; Keywords: vala languages oop ;; Keywords: vala languages oop
@ -194,9 +195,9 @@
(c-lang-defconst c-operators (c-lang-defconst c-operators
vala `((prefix "base"))) vala `((prefix "base")))
;; Vala directives ? ;; Vala directives
;; (c-lang-defconst c-opt-cpp-prefix (c-lang-defconst c-opt-cpp-prefix
;; csharp "^\\s *#.*") vala "\\s *#\\s *")
;; Vala uses the following assignment operators ;; Vala uses the following assignment operators
@ -206,7 +207,9 @@
;; This defines the primative types for Vala ;; This defines the primative types for Vala
(c-lang-defconst c-primitive-type-kwds (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 ;; The keywords that define that the following is a type, such as a
;; class definition. ;; class definition.
@ -227,7 +230,7 @@
vala '("public" "partial" "private" "const" "abstract" vala '("public" "partial" "private" "const" "abstract"
"protected" "ref" "in" "out" "static" "virtual" "protected" "ref" "in" "out" "static" "virtual"
"override" "params" "internal" "weak" "owned" "override" "params" "internal" "weak" "owned"
"unowned")) "unowned" "async" "yield"))
;; We don't use the protection level stuff because it breaks the ;; We don't use the protection level stuff because it breaks the
;; method indenting. Not sure why, though. ;; method indenting. Not sure why, though.
@ -277,7 +280,7 @@
;; We need to treat namespace as an outer block to class indenting ;; We need to treat namespace as an outer block to class indenting
;; works properly. ;; works properly.
(c-lang-defconst c-other-block-decl-kwds (c-lang-defconst c-other-block-decl-kwds
vala '("namespace")) vala '("namespace" "extern"))
;; We need to include the "in" for the foreach ;; We need to include the "in" for the foreach
(c-lang-defconst c-other-kwds (c-lang-defconst c-other-kwds
@ -289,9 +292,9 @@
vala 'c-awk-at-vsemi-p) vala 'c-awk-at-vsemi-p)
(defcustom vala-font-lock-extra-types nil ;; (defcustom vala-font-lock-extra-types nil
"*List of extra types (aside from the type keywords) to recognize in Vala mode. ;; "*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.") ;; Each list item should be a regexp matching a single identifier.")
(defconst vala-font-lock-keywords-1 (c-lang-const c-matchers-1 vala) (defconst vala-font-lock-keywords-1 (c-lang-const c-matchers-1 vala)
"Minimal highlighting for Vala mode.") "Minimal highlighting for Vala mode.")

View File

@ -2,7 +2,7 @@
Name: vala Name: vala
Version: 0.16.0 Version: 0.16.0
Release: 1%{?dist} Release: 2%{?dist}
Summary: A modern programming language for GNOME Summary: A modern programming language for GNOME
Group: Development/Languages Group: Development/Languages
@ -36,8 +36,8 @@ BuildRequires: emacs emacs-el
%global vala_manpages valac %global vala_manpages valac
%global vala_tools_binaries vala-gen-introspect vapicheck vapigen %global vala_tools_binaries vala-gen-introspect vapicheck vapigen
%global vala_tools_manpages vala-gen-introspect vapigen %global vala_tools_manpages vala-gen-introspect vapigen
Requires(post): %{_sbindir}/update-alternatives Requires(posttrans): %{_sbindir}/update-alternatives
Requires(postun): %{_sbindir}/update-alternatives Requires(preun): %{_sbindir}/update-alternatives
%description %description
@ -194,7 +194,7 @@ rm -rf $RPM_BUILD_ROOT
%endif %endif
%post %posttrans
/sbin/ldconfig /sbin/ldconfig
for f in %{vala_binaries}; for f in %{vala_binaries};
do do
@ -207,7 +207,7 @@ do
$f.1.gz %{_mandir}/man1/$f-%{api_ver}.1.gz 90 $f.1.gz %{_mandir}/man1/$f-%{api_ver}.1.gz 90
done done
%post tools %posttrans tools
for f in %{vala_tools_binaries}; for f in %{vala_tools_binaries};
do do
%{_sbindir}/update-alternatives --install %{_bindir}/$f \ %{_sbindir}/update-alternatives --install %{_bindir}/$f \
@ -219,36 +219,30 @@ do
$f.1.gz %{_mandir}/man1/$f-%{api_ver}.1.gz 90 $f.1.gz %{_mandir}/man1/$f-%{api_ver}.1.gz 90
done done
%postun %preun
/sbin/ldconfig /sbin/ldconfig
if [ $1 -eq 0 ]; for f in %{vala_binaries};
then do
for f in %{vala_binaries};
do
%{_sbindir}/update-alternatives --remove $f \ %{_sbindir}/update-alternatives --remove $f \
%{_bindir}/$f-%{api_ver} %{_bindir}/$f-%{api_ver}
done done
for f in %{vala_manpages}; for f in %{vala_manpages};
do do
%{_sbindir}/update-alternatives --remove $f.1.gz \ %{_sbindir}/update-alternatives --remove $f.1.gz \
%{_mandir}/man1/$f-%{api_ver}.1.gz %{_mandir}/man1/$f-%{api_ver}.1.gz
done done
fi
%postun tools %preun tools
if [ $1 -eq 0 ]; for f in %{vala_tools_binaries};
then do
for f in %{vala_tools_binaries};
do
%{_sbindir}/update-alternatives --remove $f \ %{_sbindir}/update-alternatives --remove $f \
%{_bindir}/$f-%{api_ver} %{_bindir}/$f-%{api_ver}
done done
for f in %{vala_tools_manpages}; for f in %{vala_tools_manpages};
do do
%{_sbindir}/update-alternatives --remove $f.1.gz \ %{_sbindir}/update-alternatives --remove $f.1.gz \
%{_mandir}/man1/$f-%{api_ver}.1.gz %{_mandir}/man1/$f-%{api_ver}.1.gz
done done
fi
%files %files
@ -308,6 +302,10 @@ fi
%changelog %changelog
* Thu Apr 5 2012 Michel Salim <salimma@fedoraproject.org> - 0.16.0-2
- Update vala-mode.el to April 2011 release
- Fix registration of Vala alternatives
* Wed Apr 04 2012 Kalev Lember <kalevlember@gmail.com> - 0.16.0-1 * Wed Apr 04 2012 Kalev Lember <kalevlember@gmail.com> - 0.16.0-1
- Update to 0.16.0 - Update to 0.16.0