]> git.pld-linux.org Git - packages/vim.git/blobdiff - vim-home_etc.patch
Avoid common :X mistype. replace it with :x
[packages/vim.git] / vim-home_etc.patch
index 20c40b1262847190c754c50f3dfc9f63b2db0e1c..d8ce61297304bf458083ebbe96fa9e46e5a2baeb 100644 (file)
@@ -1,27 +1,26 @@
 diff -Nru vim62.orig/src/misc1.c vim62/src/misc1.c
 --- vim62.orig/src/misc1.c     2003-11-11 18:53:52.000000000 +0100
 +++ vim62/src/misc1.c  2003-11-11 19:29:32.000000000 +0100
-@@ -3333,7 +3333,7 @@
-     if (STRCMP(name, "HOME") == 0)
-       return homedir;
- #endif
--
+@@ -2220,12 +2220,19 @@
+       return p;
+     }
+ #else
 +first_test:
      p = mch_getenv(name);
-     if (p != NULL && *p == NUL)           /* empty is the same as not set */
+     if (p != NULL && *p == NUL)           // empty is the same as not set
        p = NULL;
-@@ -3341,6 +3341,11 @@
      if (p != NULL)
        return p;
++
 +    if (strcmp(name, "HOME_ETC") == 0) {
-+      name = "HOME";
-+      goto first_test;
++      name = "HOME";
++      goto first_test;
 +    }
 +
-     vimruntime = (STRCMP(name, "VIMRUNTIME") == 0);
-     if (!vimruntime && STRCMP(name, "VIM") != 0)
-       return NULL;
+ #endif
+     // handling $VIMRUNTIME and $VIM is below, bail out if it's another name.
 --- vim62.orig/src/os_unix.h   2003-11-11 18:53:52.000000000 +0100
 +++ vim62/src/os_unix.h        2003-11-11 19:53:54.000000000 +0100
 @@ -264,7 +264,7 @@
@@ -60,25 +59,30 @@ diff -Nru vim62.orig/src/misc1.c vim62/src/misc1.c
  #  endif
  # endif
  # if !defined(VIMINFO_FILE2) && defined(OS2)
-@@ -362,7 +362,7 @@ typedef struct dsc$descriptor   DESC;
+@@ -358,7 +358,7 @@ typedef struct dsc$descriptor   DESC;
  # ifdef VMS
  #  define DFLT_VDIR    "sys$login:vimfiles/view"
  # else
--#  define DFLT_VDIR    "$HOME/.vim/view"       /* default for 'viewdir' */
-+#  define DFLT_VDIR    "$HOME_ETC/.vim/view"       /* default for 'viewdir' */
+-#  define DFLT_VDIR    "$HOME/.vim/view"       // default for 'viewdir'
++#  define DFLT_VDIR    "$HOME_ETC/.vim/view"       // default for 'viewdir'
  # endif
  #endif
  
-@@ -370,10 +370,10 @@ typedef struct dsc$descriptor   DESC;
- #else
+@@ -371,14 +371,14 @@
  # ifdef RUNTIME_GLOBAL
- #  define DFLT_RUNTIMEPATH    "~/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after,~/.vim/after"
--#  define CLEAN_RUNTIMEPATH   RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after"
-+#  define CLEAN_RUNTIMEPATH   "$HOME_ETC/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after,$HOME_ETC/.vim/after"
+ #  ifdef RUNTIME_GLOBAL_AFTER
+ #   define DFLT_RUNTIMEPATH   "~/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER ",~/.vim/after"
+-#   define CLEAN_RUNTIMEPATH  RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER
++#   define CLEAN_RUNTIMEPATH  "$HOME_ETC/.vim/after," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER
+ #  else
+ #   define DFLT_RUNTIMEPATH   "~/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after,~/.vim/after"
+-#   define CLEAN_RUNTIMEPATH  RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after"
++#   define CLEAN_RUNTIMEPATH  "$HOME_ETC/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after"
+ #  endif
  # else
  #  define DFLT_RUNTIMEPATH    "~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after"
 -#  define CLEAN_RUNTIMEPATH   "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
-+#  define CLEAN_RUNTIMEPATH   "$HOME_ETC/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME_ETC/.vim/after"
++#  define CLEAN_RUNTIMEPATH   "$HOME_ETC/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
  # endif
  #endif
  
This page took 0.073362 seconds and 4 git commands to generate.