]> granicus.if.org Git - vim/commitdiff
updated for version 7.0074
authorBram Moolenaar <Bram@vim.org>
Fri, 20 May 2005 21:25:31 +0000 (21:25 +0000)
committerBram Moolenaar <Bram@vim.org>
Fri, 20 May 2005 21:25:31 +0000 (21:25 +0000)
runtime/doc/eval.txt
runtime/syntax/esterel.vim [new file with mode: 0644]
src/proto/getchar.pro
src/quickfix.c
src/screen.c
src/version.h

index 84571bbc457ab0562bab308f1423dd279cd87737..159f17f00a0b96ee477fdc1591c77301be5389e0 100644 (file)
@@ -1582,7 +1582,7 @@ serverlist()                      String  get a list of available servers
 setbufvar( {expr}, {varname}, {val})   set {varname} in buffer {expr} to {val}
 setcmdpos( {pos})              Number  set cursor position in command-line
 setline( {lnum}, {line})       Number  set line {lnum} to {line}
-setqflist( {list} )            Number  set list of quickfix items using {list}
+setqflist( {list}[, {action}]) Number  set list of quickfix items using {list}
 setreg( {n}, {v}[, {opt}])     Number  set register to value and type
 setwinvar( {nr}, {varname}, {val})     set {varname} in window {nr} to {val}
 simplify( {filename})          String  simplify filename as much as possible
@@ -3604,7 +3604,7 @@ setline({lnum}, {line})                                   *setline()*
 <              Note: The '[ and '] marks are not set.
 
 
-setqflist({list})                                      *setqflist()*
+setqflist({list} [, {action}])                         *setqflist()*
                Creates a quickfix list using the items in {list}.  Each item
                in {list} is a dictionary.  Non-dictionary items in {list} are
                ignored.  Each dictionary item can contain the following
@@ -3629,6 +3629,13 @@ setqflist({list})                                        *setqflist()*
                If both "pattern" and "lnum" are present then "pattern" will
                be used.
 
+               If {action} is set to 'a', then the items from {list} are
+               added to the existing quickfix list. If there is no existing
+               list, then a new list is created. If {action} is set to 'r',
+               then the items from the current quickfix list are replaced
+               with the items from {list}. If {action} is not present or is
+               set to ' ', then a new list is created.
+
                Returns zero for success, -1 for failure.
 
                This function can be used to create a quickfix list
diff --git a/runtime/syntax/esterel.vim b/runtime/syntax/esterel.vim
new file mode 100644 (file)
index 0000000..3038355
--- /dev/null
@@ -0,0 +1,71 @@
+" Vim syntax file
+" Language:            ESTEREL
+" Maintainer:  Maurizio Tranchero <mtranchero@yahoo.it>
+" Credits:             Luca Necchi     <luca.necchi@polito.it>
+" Last Change: Tue May 17 23:49:39 CEST 2005
+" Version:             0.2
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+  syntax clear
+elseif exists("b:current_syntax")
+  finish
+endif
+
+" case is significant
+syn case ignore
+" Esterel Regions
+syn region esterelModule               start=/module/  end=/end module/        contains=ALLBUT,esterelModule
+syn region esterelLoop                 start=/loop/    end=/end loop/          contains=ALLBUT,esterelModule
+syn region esterelAbort                        start=/abort/   end=/end abort/         contains=ALLBUT,esterelModule
+syn region esterelEvery                        start=/every/   end=/end every/         contains=ALLBUT,esterelModule
+syn region esterelIf                   start=/if/              end=/end if/            contains=ALLBUT,esterelModule
+"syn region esterelConcurrent  start=/\[/              end=/\]/                        contains=ALLBUT,esterelModule
+syn region esterelConcurrent   transparent start=/\[/          end=/\]/                contains=ALLBUT,esterelModule
+syn region esterelIfThen               start=/if/              end=/then/                      oneline
+" and weak abort? how to make vim know that start='weak abort'?
+" Esterel Keywords
+syn keyword esterelStatement   module signal end
+syn keyword esterelIO                  input output 
+syn keyword esterelStatement   every do loop abort weak
+syn keyword esterelStatement   emit present await
+syn keyword esterelStatement   if then else
+syn keyword esterelBoolean             and or not xor xnor nor nand
+syn keyword esterelOperator            \[ \] 
+syn keyword esterelPippo               pippo
+" Esterel Types
+syn keyword esterelType integer float bolean
+" Esterel Comment
+syn match esterelComment       "%.*$"
+" Operators and special characters
+syn match esterelSpecial       ":"
+syn match esterelSpecial       ";"
+syn match esterelOperator      "\["
+syn match esterelOperator      "\]"
+syn match esterelOperator      ":="
+syn match esterelStatement     "\<\(if\|else\)\>"
+syn match esterelNone          "\<else\s\+if\>$"
+syn match esterelNone          "\<else\s\+if\>\s"
+
+" Class Linking
+if version >= 508 || !exists("did_esterel_syntax_inits")
+  if version < 508
+    let did_esterel_syntax_inits = 1
+    command -nargs=+ HiLink hi link <args>
+  else
+    command -nargs=+ HiLink hi def link <args>
+  endif
+
+       HiLink esterelStatement Statement
+       HiLink esterelType              Type
+       HiLink esterelComment   Comment
+       HiLink esterelBoolean   Number
+       HiLink esterelIO                String
+       HiLink esterelOperator  Type
+       HiLink esterelSpecial   Special
+
+  delcommand HiLink
+endif
+
+let b:current_syntax = "esterel"
index fc49b79723bd25243379e138005b1835e48a6de7..7b8d6bc859cda83c7006eb228157cef9e6ab1f94 100644 (file)
@@ -55,7 +55,7 @@ int check_abbr __ARGS((int c, char_u *ptr, int col, int mincol));
 int makemap __ARGS((FILE *fd, buf_T *buf));
 int put_escstr __ARGS((FILE *fd, char_u *strstart, int what));
 void check_map_keycodes __ARGS((void));
-char_u *check_map __ARGS((char_u *keys, int mode, int exact));
+char_u *check_map __ARGS((char_u *keys, int mode, int exact, int ign_mod));
 void init_mappings __ARGS((void));
 void add_map __ARGS((char_u *map, int mode));
 /* vim: set ft=c : */
index a481b0f316dabb44a7819a109f46da42094a2ebc..8d5032221ad6e53e69664a00e669c8188dabcfd3 100644 (file)
@@ -492,11 +492,15 @@ restofline:
                 */
                if ((i = (int)fmt_ptr->addr[0]) > 0)            /* %f */
                {
-                   len = (int)(regmatch.endp[i] - regmatch.startp[i]);
-                   STRNCPY(namebuf, regmatch.startp[i], len);
-                   namebuf[len] = NUL;
+                   int c = *regmatch.endp[i];
+
+                   /* Expand ~/file and $HOME/file to full path. */
+                   *regmatch.endp[i] = NUL;
+                   expand_env(regmatch.startp[i], namebuf, CMDBUFFSIZE);
+                   *regmatch.endp[i] = c;
+
                    if (vim_strchr((char_u *)"OPQ", idx) != NULL
-                           && mch_getperm(namebuf) == -1)
+                                               && mch_getperm(namebuf) == -1)
                        continue;
                }
                if ((i = (int)fmt_ptr->addr[1]) > 0)            /* %n */
@@ -2788,8 +2792,9 @@ get_errorlist(list)
  * of dictionaries.
  */
     int
-set_errorlist(list)
+set_errorlist(list, action)
     list_T     *list;
+    int                action;
 {
     listitem_T *li;
     dict_T     *d;
@@ -2801,8 +2806,16 @@ set_errorlist(list)
     int                valid, status;
     int                retval = OK;
 
-    /* make place for a new list */
-    qf_new_list();
+    if (action == ' ' || qf_curlist == qf_listcount)
+       /* make place for a new list */
+       qf_new_list();
+    else if (action == 'a' && qf_lists[qf_curlist].qf_count > 0)
+       /* Adding to existing list, find last entry. */
+       for (prevp = qf_lists[qf_curlist].qf_start;
+            prevp->qf_next != prevp; prevp = prevp->qf_next)
+           ;
+    else if (action == 'r')
+       qf_free(qf_curlist);
 
     for (li = list->lv_first; li != NULL; li = li->li_next)
     {
index 58fb4d029c36331d31418044c11bb76c5d14cfbd..01397887571448c16e9845ddd2227221e5c9313c 100644 (file)
@@ -4818,6 +4818,7 @@ draw_vsep_win(wp, row)
 
 #ifdef FEAT_WILDMENU
 static int status_match_len __ARGS((expand_T *xp, char_u *s));
+static int skip_status_match_char __ARGS((expand_T *xp, char_u *s));
 
 /*
  * Get the lenght of an item as it will be shown in the status line.
@@ -4840,12 +4841,7 @@ status_match_len(xp, s)
 
     while (*s != NUL)
     {
-       /* Don't display backslashes used for escaping, they look ugly. */
-       if (rem_backslash(s)
-#ifdef FEAT_MENU
-               || (emenu && (s[0] == '\\' && s[1] != NUL))
-#endif
-               )
+       if (skip_status_match_char(xp, s))
            ++s;
        len += ptr2cells(s);
        mb_ptr_adv(s);
@@ -4854,6 +4850,24 @@ status_match_len(xp, s)
     return len;
 }
 
+/*
+ * Return TRUE for characters that are not displayed in a status match.
+ * These are backslashes used for escaping.  Do show backslashes in help tags.
+ */
+    static int
+skip_status_match_char(xp, s)
+    expand_T   *xp;
+    char_u     *s;
+{
+    return ((rem_backslash(s) && xp->xp_context != EXPAND_HELP)
+#ifdef FEAT_MENU
+           || ((xp->xp_context == EXPAND_MENUS
+                   || xp->xp_context == EXPAND_MENUNAMES)
+                         && (s[0] == '\t' || (s[0] == '\\' && s[1] != NUL)))
+#endif
+          );
+}
+
 /*
  * Show wildchar matches in the status line.
  * Show at least the "match" item.
@@ -4989,13 +5003,7 @@ win_redr_status_matches(xp, num_matches, matches, match, showtail)
 #endif
            for ( ; *s != NUL; ++s)
        {
-           /* Don't display backslashes used for escaping, they look ugly. */
-           if (rem_backslash(s)
-#ifdef FEAT_MENU
-                   || (emenu
-                         && (s[0] == '\t' || (s[0] == '\\' && s[1] != NUL)))
-#endif
-                   )
+           if (skip_status_match_char(xp, s))
                ++s;
            clen += ptr2cells(s);
 #ifdef FEAT_MBYTE
index b6d6137a6420618a7b676476f440005f3998a611..233eb000e9cdad0aa7fe836ff6a95ed1819b66d2 100644 (file)
@@ -36,5 +36,5 @@
 #define VIM_VERSION_NODOT      "vim70aa"
 #define VIM_VERSION_SHORT      "7.0aa"
 #define VIM_VERSION_MEDIUM     "7.0aa ALPHA"
-#define VIM_VERSION_LONG       "VIM - Vi IMproved 7.0aa ALPHA (2005 May 19)"
-#define VIM_VERSION_LONG_DATE  "VIM - Vi IMproved 7.0aa ALPHA (2005 May 19, compiled "
+#define VIM_VERSION_LONG       "VIM - Vi IMproved 7.0aa ALPHA (2005 May 20)"
+#define VIM_VERSION_LONG_DATE  "VIM - Vi IMproved 7.0aa ALPHA (2005 May 20, compiled "