summaryrefslogtreecommitdiffstats
path: root/debian/patches/debian/Add-recognition-of-more-LaTeX-commands-for-tex-filetype-d.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/debian/Add-recognition-of-more-LaTeX-commands-for-tex-filetype-d.patch')
-rw-r--r--debian/patches/debian/Add-recognition-of-more-LaTeX-commands-for-tex-filetype-d.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/patches/debian/Add-recognition-of-more-LaTeX-commands-for-tex-filetype-d.patch b/debian/patches/debian/Add-recognition-of-more-LaTeX-commands-for-tex-filetype-d.patch
new file mode 100644
index 0000000..2d703d1
--- /dev/null
+++ b/debian/patches/debian/Add-recognition-of-more-LaTeX-commands-for-tex-filetype-d.patch
@@ -0,0 +1,27 @@
+From: Stefano Zacchiroli <zack@debian.org>
+Date: Fri, 25 Aug 2006 13:33:04 +0200
+Subject: Add recognition of more LaTeX commands for tex filetype detection
+
+Since filetype detection of TeX files defaults to plaintex, we've added
+detection of some additional LaTeX commands to help sway the detection
+to LaTeX.
+
+Closes: #384479
+Signed-off-by: James McCoy <jamessan@debian.org>
+---
+ runtime/autoload/dist/ft.vim | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim
+index bfc325d..7d1e15f 100644
+--- a/runtime/autoload/dist/ft.vim
++++ b/runtime/autoload/dist/ft.vim
+@@ -935,7 +935,7 @@ export def FTtex()
+ var firstNC = search('^\s*[^[:space:]%]', 'c', 1000)
+ if firstNC > 0
+ # Check the next thousand lines for a LaTeX or ConTeXt keyword.
+- var lpat = 'documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>'
++ var lpat = 'documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>\|renewcommand\>\|part\>\|chapter\>\|section\>\|subsection\>\|subsubsection\>\|paragraph\>\|subparagraph\>\|subsubparagraph'
+ var cpat = 'start\a\+\|setup\a\+\|usemodule\|enablemode\|enableregime\|setvariables\|useencoding\|usesymbols\|stelle\a\+\|verwende\a\+\|stel\a\+\|gebruik\a\+\|usa\a\+\|imposta\a\+\|regle\a\+\|utilisemodule\>'
+ var kwline = search('^\s*\\\%(' .. lpat .. '\)\|^\s*\\\(' .. cpat .. '\)',
+ 'cnp', firstNC + 1000)