[vim] 02/02: debcontrol.vim: Fix highlighting of javascript in debcontrolSection

James McCoy jamessan at debian.org
Thu Jul 6 02:03:34 UTC 2017


This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/experimental
in repository vim.

commit 51dc8ee0f6439b19a91e909fdd47e0e8ddd0b187
Author: James McCoy <jamessan at debian.org>
Date:   Wed Jul 5 22:02:26 2017 -0400

    debcontrol.vim: Fix highlighting of javascript in debcontrolSection
    
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 debian/changelog                                   |  1 +
 debian/patches/series                              |  1 +
 ...ix-highlighting-of-javascript-in-debcontr.patch | 26 ++++++++++++++++++++++
 3 files changed, 28 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 9b32c2d..9441170 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,7 @@ vim (2:8.0.0691-1) UNRELEASED; urgency=medium
     + Remove src/po/vim.pot and *.pyc during clean
   * debcontrol.vim:
     + Add highlighting for Build-(Depends|Conflicts)-Arch
+    + Fix syntax highlighting of "javascript" section.  (Closes: #867307)
 
  -- James McCoy <jamessan at debian.org>  Sat, 17 Jun 2017 21:51:10 -0400
 
diff --git a/debian/patches/series b/debian/patches/series
index 499fdf9..6881e1d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ debian/Detect-the-rst-filetype-using-the-contents-of-the-file.patch
 debian/Add-recognition-of-more-LaTeX-commands-for-tex-filetype-d.patch
 debian/Document-Debian-s-decision-to-disable-modelines-by-defaul.patch
 upstream/debcontrol.vim-Add-support-for-Build-Depends-Conflicts-Ar.patch
+upstream/debcontrol.vim-Fix-highlighting-of-javascript-in-debcontr.patch
diff --git a/debian/patches/upstream/debcontrol.vim-Fix-highlighting-of-javascript-in-debcontr.patch b/debian/patches/upstream/debcontrol.vim-Fix-highlighting-of-javascript-in-debcontr.patch
new file mode 100644
index 0000000..67a4c2a
--- /dev/null
+++ b/debian/patches/upstream/debcontrol.vim-Fix-highlighting-of-javascript-in-debcontr.patch
@@ -0,0 +1,26 @@
+From: James McCoy <jamessan at debian.org>
+Date: Wed, 5 Jul 2017 21:32:20 -0400
+Subject: debcontrol.vim: Fix highlighting of javascript in debcontrolSection
+
+Matches can't overlap, so the earlier "java" match blocks "javascript".
+Making "script" an optional suffix, instead of an alternation, fixes the
+matching.
+
+Signed-off-by: James McCoy <jamessan at debian.org>
+---
+ runtime/syntax/debcontrol.vim | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim
+index 67f2b57..b50bfff 100644
+--- a/runtime/syntax/debcontrol.vim
++++ b/runtime/syntax/debcontrol.vim
+@@ -38,7 +38,7 @@ unlet s:kernels s:archs s:pairs
+ syn match debcontrolMultiArch contained "\%(no\|foreign\|allowed\|same\)"
+ syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+"
+ syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)"
+-syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|introspection|java|javascript|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|rust|science|shells| [...]
++syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|introspection|java%(script)=|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|rust|science|shells|s [...]
+ syn match debcontrolPackageType contained "u\?deb"
+ syn match debcontrolVariable contained "\${.\{-}}"
+ syn match debcontrolDmUpload contained "\cyes"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git



More information about the pkg-vim-maintainers mailing list