From 832763f29065b614443252446be7580a952acb24 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 10 Apr 2024 22:09:22 +0200 Subject: Adding debian version 2:9.1.0016-1. Signed-off-by: Daniel Baumann --- ...of-more-LaTeX-commands-for-tex-filetype-d.patch | 27 ++++++ ...t-filetype-using-the-contents-of-the-file.patch | 28 ++++++ ...s-decision-to-disable-modelines-by-defaul.patch | 29 ++++++ ...ng-a-vimrc.tiny-when-Vim-is-invoked-as-vi.patch | 101 +++++++++++++++++++++ debian/patches/series | 4 + 5 files changed, 189 insertions(+) create mode 100644 debian/patches/debian/Add-recognition-of-more-LaTeX-commands-for-tex-filetype-d.patch create mode 100644 debian/patches/debian/Detect-the-rst-filetype-using-the-contents-of-the-file.patch create mode 100644 debian/patches/debian/Document-Debian-s-decision-to-disable-modelines-by-defaul.patch create mode 100644 debian/patches/debian/Support-sourcing-a-vimrc.tiny-when-Vim-is-invoked-as-vi.patch create mode 100644 debian/patches/series (limited to 'debian/patches') 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..cc448ab --- /dev/null +++ b/debian/patches/debian/Add-recognition-of-more-LaTeX-commands-for-tex-filetype-d.patch @@ -0,0 +1,27 @@ +From: Stefano Zacchiroli +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 +--- + 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 2958f45..ce61f95 100644 +--- a/runtime/autoload/dist/ft.vim ++++ b/runtime/autoload/dist/ft.vim +@@ -981,7 +981,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) diff --git a/debian/patches/debian/Detect-the-rst-filetype-using-the-contents-of-the-file.patch b/debian/patches/debian/Detect-the-rst-filetype-using-the-contents-of-the-file.patch new file mode 100644 index 0000000..350a329 --- /dev/null +++ b/debian/patches/debian/Detect-the-rst-filetype-using-the-contents-of-the-file.patch @@ -0,0 +1,28 @@ +From: James Vega +Date: Fri, 18 Aug 2006 09:06:20 -0400 +Subject: Detect the rst filetype using the contents of the file + +Closes: #382541 +--- + runtime/autoload/dist/script.vim | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/runtime/autoload/dist/script.vim b/runtime/autoload/dist/script.vim +index 1685093..7de8fed 100644 +--- a/runtime/autoload/dist/script.vim ++++ b/runtime/autoload/dist/script.vim +@@ -412,6 +412,14 @@ def DetectFromText(line1: string) + elseif line1 =~ 'exec\s\+\S*scheme' || line2 =~ 'exec\s\+\S*scheme' + setl ft=scheme + ++ # rst files ++ elseif line1 =~ '^\.\.\s\|^\s*restindex\s*$' ++ || line2 =~ '^\.\.\s\|^\s*restindex\s*$' ++ || line3 =~ '^\.\.\s\|^\s*restindex\s*$' ++ || line4 =~ '^\.\.\s\|^\s*restindex\s*$' ++ || line5 =~ '^\.\.\s\|^\s*restindex\s*$' ++ set ft=rst ++ + # Git output + elseif line1 =~ '^\(commit\|tree\|object\) \x\{40,\}\>\|^tag \S\+$' + setl ft=git diff --git a/debian/patches/debian/Document-Debian-s-decision-to-disable-modelines-by-defaul.patch b/debian/patches/debian/Document-Debian-s-decision-to-disable-modelines-by-defaul.patch new file mode 100644 index 0000000..0d69118 --- /dev/null +++ b/debian/patches/debian/Document-Debian-s-decision-to-disable-modelines-by-defaul.patch @@ -0,0 +1,29 @@ +From: James Vega +Date: Thu, 27 Mar 2008 03:42:02 +0000 +Subject: Document Debian's decision to disable modelines by default + +Modelines have historically been a source of vulnerabilities in Vim. +As long as it remains a "blacklist suspected/proven dangerous options" +instead of a "whitelist allowed options" piece of functionality, +Debian's system-wide vimrc will maintain this setting. As such, the +documentation needs to be updated to reflect the induced behavior. + +Closes: #472522 +Signed-off-by: James McCoy +--- + runtime/doc/options.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt +index 77efbd6..3783f3f 100644 +--- a/runtime/doc/options.txt ++++ b/runtime/doc/options.txt +@@ -5593,7 +5593,7 @@ A jump table for the options with a short description can be found at |Q_op|. + + *'modeline'* *'ml'* *'nomodeline'* *'noml'* + 'modeline' 'ml' boolean (Vim default: on (off for root), +- Vi default: off) ++ Debian: off, Vi default: off) + local to buffer + If 'modeline' is on 'modelines' gives the number of lines that is + checked for set commands. If 'modeline' is off or 'modelines' is zero diff --git a/debian/patches/debian/Support-sourcing-a-vimrc.tiny-when-Vim-is-invoked-as-vi.patch b/debian/patches/debian/Support-sourcing-a-vimrc.tiny-when-Vim-is-invoked-as-vi.patch new file mode 100644 index 0000000..4ac5199 --- /dev/null +++ b/debian/patches/debian/Support-sourcing-a-vimrc.tiny-when-Vim-is-invoked-as-vi.patch @@ -0,0 +1,101 @@ +From: James McCoy +Date: Tue, 6 Oct 2015 23:46:30 -0400 +Subject: Support sourcing a vimrc.tiny when Vim is invoked as vi + +This is used only in the vim-tiny package to allow a specific +configuration for vim-tiny's vi. The vim-tiny package is substantially +different from other Vim packages, so it does not make sense to +share the same config. + +Closes: #222138 +Signed-off-by: Stefano Zacchiroli +Signed-off-by: James Vega +--- + src/main.c | 23 ++++++++++++++++++++++- + src/os_unix.h | 3 +++ + src/structs.h | 3 +++ + 3 files changed, 28 insertions(+), 1 deletion(-) + +diff --git a/src/main.c b/src/main.c +index 770726f..d91a5e4 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -1956,6 +1956,10 @@ parse_command_name(mparm_T *parmp) + } + else if (STRNICMP(initstr, "vim", 3) == 0) + initstr += 3; ++#ifdef SYS_TINYRC_FILE ++ else if (STRNICMP(initstr, "vi", 2) == 0) ++ parmp->vi_mode = TRUE; ++#endif + + // Catch "[r][g]vimdiff" and "[r][g]viewdiff". + if (STRICMP(initstr, "diff") == 0) +@@ -3251,7 +3255,12 @@ source_startup_scripts(mparm_T *parmp) + * Get system wide defaults, if the file name is defined. + */ + #ifdef SYS_VIMRC_FILE +- (void)do_source((char_u *)SYS_VIMRC_FILE, FALSE, DOSO_NONE, NULL); ++# if defined(SYS_TINYRC_FILE) && defined(TINY_VIMRC) ++ if (parmp->vi_mode) ++ (void)do_source((char_u *)SYS_TINYRC_FILE, FALSE, DOSO_NONE, NULL); ++ else ++# endif ++ (void)do_source((char_u *)SYS_VIMRC_FILE, FALSE, DOSO_NONE, NULL); + #endif + #ifdef MACOS_X + (void)do_source((char_u *)"$VIMRUNTIME/macmap.vim", FALSE, +@@ -3290,13 +3299,25 @@ source_startup_scripts(mparm_T *parmp) + #ifdef USR_EXRC_FILE2 + && do_source((char_u *)USR_EXRC_FILE2, FALSE, + DOSO_NONE, NULL) == FAIL ++#endif ++#if defined(SYS_TINYRC_FILE) && defined(TINY_VIMRC) ++ && !parmp->vi_mode + #endif + && !has_dash_c_arg) + { + // When no .vimrc file was found: source defaults.vim. + if (do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, DOSO_NONE, + NULL) == FAIL) ++ { ++ /* ++ * If running as the vim.tiny executable, regardless what argv[0] is, we ++ * don't want to error due to missing defaults.vim. That's provided by ++ * vim-runtime, which isn't typically installed with vim-tiny. ++ */ ++#ifndef TINY_VIMRC + emsg(_(e_failed_to_source_defaults)); ++#endif ++ } + } + } + +diff --git a/src/os_unix.h b/src/os_unix.h +index 4c77e15..fa1205f 100644 +--- a/src/os_unix.h ++++ b/src/os_unix.h +@@ -207,6 +207,9 @@ typedef struct dsc$descriptor DESC; + /* + * Unix system-dependent file names + */ ++#ifndef SYS_TINYRC_FILE ++# define SYS_TINYRC_FILE "$VIM/vimrc.tiny" ++#endif + #ifndef SYS_VIMRC_FILE + # define SYS_VIMRC_FILE "$VIM/vimrc" + #endif +diff --git a/src/structs.h b/src/structs.h +index 4e081b8..3655543 100644 +--- a/src/structs.h ++++ b/src/structs.h +@@ -4556,6 +4556,9 @@ typedef struct + #ifdef FEAT_DIFF + int diff_mode; // start with 'diff' set + #endif ++#ifdef SYS_TINYRC_FILE ++ int vi_mode; /* started as "vi" */ ++#endif + } mparm_T; + + /* diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..926684f --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,4 @@ +debian/Support-sourcing-a-vimrc.tiny-when-Vim-is-invoked-as-vi.patch +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 -- cgit v1.2.3