1# vile 9.4m - patch 2004/12/15 - Thomas Dickey <dickey@his.com> 2# ------------------------------------------------------------------------------ 3# $Header: | 1 4# CHANGES | 58 5# MANIFEST | 3 6# buffer.c | 208 ++- 7# buglist | 7 8# builtflt.c | 68 + 9# cmdtbl | 15 10# configure | 2652 ++++++++++++++++++++--------------------- 11# configure.in | 16 12# display.c | 80 - 13# doc/filters.doc | 34 14# doc/macros.doc | 67 - 15# edef.h | 5 16# estruct.h | 13 17# eval.c | 196 ++- 18# filters/as-filt.l | 6 19# filters/asm-filt.l | 8 20# filters/au3-filt.l | 8 21# filters/bat-filt.l | 6 22# filters/c-filt.c | 20 23# filters/filterio.c | 33 24# filters/filters.c | 3 25# filters/filters.h | 7 26# filters/filters.rc | 40 27# filters/htmlfilt.l | 9 28# filters/imakeflt.l | 19 29# filters/key-filt.c | 11 30# filters/m4-filt.c | 3 31# filters/makefilt.l | 19 32# filters/pl-filt.c | 24 33# filters/pot-filt.l | 5 34# filters/ps-filt.l | 5 35# filters/rb-filt.l | 3 36# filters/rpm-filt.l | 16 37# filters/rubyfilt.c | 30 38# filters/sccsfilt.l | 5 39# filters/sed-filt.c | 3 40# filters/sh-filt.l | 16 41# filters/spell.rc | 36 42# filters/spellflt.l | 8 43# filters/sql-filt.l | 9 44# filters/tc-filt.l | 12 45# filters/tcl-filt.l | 4 46# filters/vilefilt.l | 10 47# filters/vl-filt.l | 20 48# filters/xml-filt.l | 50 49# filters/xresfilt.l | 11 50# input.c | 4 51# macros/gnugpg.rc | 8 52# macros/which.rc | 107 + 53# main.c | 5 54# makefile.in | 17 55# makefile.wnt | 3 56# modes.c | 358 +++-- 57# modetbl | 22 58# ntconio.c | 51 59# ntwinio.c | 53 60# patchlev.h | 2 61# proto.h | 19 62# revlist | 129 + 63# statevar.c | 8 64# tbuff.c | 14 65# tcap.c | 3 66# vile-9.4.spec | 9 67# vile-9.4m/macros/showeach.rc | 78 + 68# vile.hlp | 16 69# x11.c | 370 ++--- 70# 67 files changed, 3017 insertions(+), 2141 deletions(-) 71# ------------------------------------------------------------------------------ 72Index: CHANGES 73--- vile-9.4l+/CHANGES 2004-12-08 01:01:53.000000000 +0000 74+++ vile-9.4m/CHANGES 2004-12-15 23:56:47.000000000 +0000 75@@ -1,5 +1,63 @@ 76 Changes for vile 9.5 (released ??? ??? ?? ????) 77 78+ 20041215 (m) 79+ > Tom Dickey: 80+ + modify x11.c, ntconio.c and ntwinio.c to make modifiers work with tab 81+ key, e.g., to add shift-key as a back-tab key. 82+ + add macro show-each-buffer (file showeach.rc), which splits up the 83+ screen into equal chunks to display as many of the non-scratch 84+ buffers as possible. 85+ + modify macro parameter evaluation so it does not attempt to compute 86+ a value for function tokens or goto-labels. Otherwise pathnames such 87+ as "~\foo" look like macro directives and produce an error. 88+ + correct slash/backslash translation (win32, etc) for some of the 89+ built-in functions; the translated result was not actually the return 90+ value: &path and &pcat. 91+ + correct flags in modetbl used to annotate trace of &seq and a few 92+ other operators. 93+ + correct length computed for $bflags variable; an empty string was 94+ returned. 95+ + add a section on command-line options to doc/filters.doc 96+ + add macro which-filter to show which locations would be checked for 97+ an external filter. If the filter happens to be built-in, this is 98+ also noted, in the message line. 99+ + improve 'eval' command, provide for mixture of functions and other 100+ tokens which are passed to the script interpreter. 101+ + modify SpellFilter macro to use the results from [Filter Messages] 102+ with the error-finder to step through the misspellings. 103+ + add macro show-filtermsgs to show syntax filter messages, setting the 104+ list to the error-buffer to provide simple stepping through the 105+ errors which are found. 106+ + add commands popup-buffer and popdown-buffer, which open/close 107+ windows for the given buffer rather than changing the current window 108+ to show a different buffer. The popup-buffer command is a wrapper 109+ for the existing logic used for help and similar commands. The 110+ popdown-buffer command differs from delete-window by closing all 111+ windows for the given buffer. 112+ + remove the pre-9.4e workarounds for set-highlighting and 113+ which-keywords macros. 114+ + modify kdb_reply() to shift the minibuffer left/right as needed after 115+ doing the initial tab of a name-completion, in case that left the 116+ cursor position past the end of the line (report by Paul Fox). 117+ + add new operators to make it simpler for macros to check for 118+ features: &isa, &classof and &mclass. 119+ + modify historical-buffer to allow tab/back-tab to cycle through the 120+ first 9 buffers, solves the problem of seeing more than the first 121+ few possibilities on the message line. Toggling with the repeated 122+ '_' selects the first buffer shown. 123+ + add back-tab to termcap/terminfo driver as a bindable key. 124+ + modify configure script to make builtflt.h part of $(BUILTHDRS) to 125+ simplify "make sources" rule. 126+ + modify htmlfilt.l to match </script> in the middle of a line to 127+ accommodate pages where the script is given by a "src=". 128+ + add filtermsgs mode, for built-in filters to report syntax errors 129+ into [Filter Messages] buffer so that one may use the error finder to 130+ locate these (motivated by a 200,000 line xml file). 131+ + correct state manipulation in xml-filt.l, which was confused by 132+ CDATA pattern. 133+ + correct $CPPFLAGS for linting configurations with built-in filters. 134+ + correct typo in configure script from 9.4k fixes for iconv_open(). 135+ 136 20041207 (l) 137 > Clark Morgan: 138 + modify special treatment of "#" which prevents it from being shifted 139Index: MANIFEST 140--- vile-9.4l+/MANIFEST 2004-12-08 01:48:52.000000000 +0000 141+++ vile-9.4m/MANIFEST 2004-12-16 00:53:14.000000000 +0000 142@@ -1,4 +1,4 @@ 143-MANIFEST for vile, version v9_4l 144+MANIFEST for vile, version v9_4m 145 -------------------------------------------------------------------------------- 146 MANIFEST this file 147 CHANGES Change-log for VILE 148@@ -332,6 +332,7 @@ 149 macros/pictmode.rc macros to support "picture-mode" editing 150 macros/search.rc find a file in one of several locations 151 macros/shifts.rc macros to shift words left/right 152+macros/showeach.rc show-each-buffer 153 macros/vile-pager use vile as a pager 154 macros/vileinit.rc sample initialization file 155 macros/vilemenu.rc sample menu for xvile 156Index: cmdtbl 157Prereq: 1.230 158--- vile-9.4l+/cmdtbl 2004-12-07 01:28:55.000000000 +0000 159+++ vile-9.4m/cmdtbl 2004-12-14 20:18:42.000000000 +0000 160@@ -97,7 +97,7 @@ 161 # in '!' listed, then the flag does nothing, and should be 162 # viewed simply as documentation. 163 # 164-# @Header: /usr/build/vile/vile/RCS/cmdtbl,v 1.230 2004/12/07 01:28:55 tom Exp @ 165+# @Header: /usr/build/vile/vile/RCS/cmdtbl,v 1.233 2004/12/14 20:18:42 tom Exp @ 166 # 167 # 168 169@@ -625,7 +625,7 @@ 170 firstbuffer NONE 171 "rewind" 172 "rew!" 173- <go to first buffer in buffer list. (does nothing if \"autobuffer\" set> 174+ <go to first buffer in buffer list> 175 firstnonwhite MOTION|MINIBUF 176 "first-nonwhite" !FEWNAMES 177 '^' 178@@ -1686,13 +1686,22 @@ 179 edit_buffer NONE 180 "B" 181 "edit-buffer" !FEWNAMES 182- <make or switch to the given buffer; will not look for a file by that name> 183+ <make or switch to the given buffer> 184+popup_buffer NONE !SMALLER 185+ "popup-buffer" 186+ "open-window" !FEWNAMES 187+ <open window for the given buffer> 188+popdown_buffer NONE !SMALLER 189+ "popdown-buffer" 190+ "close-windows" !FEWNAMES 191+ <open all windows for the given buffer> 192 usekreg REDO 193 "use-register" !FEWNAMES 194 '"' 195 <name a register, for use with a following command which references it> 196 userbeep NONE !SMALLER 197 "beep" 198+ 'FN-b' KEY_BackTab 199 <force the terminal to ring (or flash, if \"set flash\" is active)> 200 visual NONE 201 "visual" 202Index: configure.in 203Prereq: 1.211 204--- vile-9.4l+/configure.in 2004-12-04 00:42:49.000000000 +0000 205+++ vile-9.4m/configure.in 2004-12-10 22:52:59.000000000 +0000 206@@ -1,12 +1,12 @@ 207 dnl Process this file with autoconf to produce a configure script. 208-AC_REVISION(@Revision: 1.211 @) 209+AC_REVISION(@Revision: 1.214 @) 210 AC_PREREQ(2.13.20030927) 211 rm -f config.cache 212 213 ### Use "configure -with-screen" to override the default configuration, which is 214 ### termcap-based on unix systems. 215 216-dnl @Header: /usr/build/vile/vile/RCS/configure.in,v 1.211 2004/12/04 00:42:49 tom Exp @ 217+dnl @Header: /usr/build/vile/vile/RCS/configure.in,v 1.214 2004/12/10 22:52:59 tom Exp @ 218 219 define(MAKELIST, sh $srcdir/filters/makelist.sh $srcdir/filters/genmake.mak) 220 221@@ -52,6 +52,10 @@ 222 CF_LIB_PREFIX 223 224 ### options to control how much we build 225+BUILTHDRS="nebind.h neproto.h neexec.h nefunc.h nemode.h nename.h nevars.h nefkeys.h nefsms.h" 226+BUILTLIBS= 227+BUILTSRCS= 228+ 229 AC_MSG_CHECKING(if you wish to build only core functions) 230 CF_ARG_DISABLE(extensions, 231 [ --disable-extensions test: build only core functions], 232@@ -287,6 +291,7 @@ 233 perl_lib_path=`$PERL -MConfig -e 'print $Config{privlib}'` 234 AC_DEFINE(OPT_PERL) 235 EXTRAOBJS="$EXTRAOBJS perl.o" 236+ BUILTSRCS="$BUILTSRCS perl.c" 237 LINK_PREFIX=`$PERL -MConfig -e 'print $Config{shrpenv}'` 238 ac_link="$LINK_PREFIX $ac_link" 239 CF_CHECK_CFLAGS(`$PERL -MExtUtils::Embed -e ccopts`) 240@@ -672,7 +677,7 @@ 241 [cf_func_iconv="$withval"], 242 [cf_func_iconv=yes]) 243 AC_MSG_RESULT($cf_func_iconv) 244-if test "$cf_func_iconv" == yes ; then 245+if test "$cf_func_iconv" = yes ; then 246 AC_DEFINE(OPT_ICONV_FUNCS) 247 test "$cf_cv_func_iconv" != yes && LIBS="$cf_cv_func_iconv $LIBS" 248 fi # test $cf_func_iconv" = yes 249@@ -834,9 +839,10 @@ 250 251 if test "$cf_filter_libs" = yes ; then 252 EXTRAOBJS="$EXTRAOBJS builtflt.o" 253- CFLAGS="-I\$(srcdir)/filters $CFLAGS" 254+ CPPFLAGS="-I\$(srcdir)/filters $CPPFLAGS" 255 FILTER_LIBS="-Lfilters -lvlflt" 256 LIBBUILTFLT="${LIB_PREFIX}vlflt.a" 257+ BUILTHDRS="$BUILTHDRS builtflt.h" 258 BUILTLIBS="$BUILTLIBS filters/$LIBBUILTFLT" 259 AC_DEFINE(OPT_FILTER) 260 else 261@@ -846,7 +852,9 @@ 262 fi 263 264 AC_SUBST(EXTRAOBJS) 265+AC_SUBST(BUILTHDRS) 266 AC_SUBST(BUILTLIBS) 267+AC_SUBST(BUILTSRCS) 268 AC_SUBST(FILTER_LIBS) 269 AC_SUBST(LIBBUILTFLT) 270 271Index: doc/filters.doc 272Prereq: 1.32 273--- vile-9.4l+/doc/filters.doc 2004-11-11 00:47:06.000000000 +0000 274+++ vile-9.4m/doc/filters.doc 2004-12-14 00:47:49.000000000 +0000 275@@ -33,7 +33,7 @@ 276 277 [ If $VILE_STARTUP_PATH is not defined, the filter checks the 278 "prefix" directory specified when all filters were compiled 279- (default path is /usr/local/share/vile/vile.keyords). ] 280+ (default path is /usr/local/share/vile/vile.keywords). ] 281 282 and then here: 283 284@@ -146,6 +146,38 @@ 285 language keywords, if any. 286 287 288+OPTIONS 289+------- 290+ 291+A few options are common to all filters: 292+ 293+ -d is recognized when the filters have been compiled with "DEBUG" defined. 294+ This is used in the more complicated filters such as perl and ruby to 295+ show the parsing. 296+ 297+ -k FILE 298+ 299+ -q exits the filter before writing the marked-up output. This happens 300+ after processing the class definitions, so it is useful in combination 301+ with the -v option to simply obtain the class information. 302+ 303+ -t holds the tabstop setting, which can be used in a filter for column 304+ computations. 305+ 306+ -v verbose, turns on extra output which can be used for troubleshooting 307+ configuration problems. 308+ 309+The C syntax filter recognizes additional options to customize it for Java and 310+JavaScript: 311+ 312+ -j Extend name- and literal-syntax to include Java. 313+ 314+ -p Disallow preprocessor lines. 315+ 316+ -s for JavaScript (to support jsmode). This controls whether to allow 317+ regular expressions in certain cases. 318+ 319+ 320 PROGRAMS 321 -------- 322 323@@ -230,4 +262,4 @@ 324 The lex filters have been well tested only with flex, which treats newlines 325 differently. Older versions of lex may not support the %x states. 326 327--- @Header: /usr/build/vile/vile/doc/RCS/filters.doc,v 1.32 2004/11/11 00:47:06 tom Exp @ 328+-- @Header: /usr/build/vile/vile/doc/RCS/filters.doc,v 1.33 2004/12/14 00:47:49 tom Exp @ 329Index: doc/macros.doc 330Prereq: 1.93 331--- vile-9.4l+/doc/macros.doc 2004-10-20 22:47:38.000000000 +0000 332+++ vile-9.4m/doc/macros.doc 2004-12-12 20:29:24.000000000 +0000 333@@ -774,7 +774,7 @@ 334 &mod "N1" "N2" Divide the "N1" by "N2", return remainder. 335 &negate "N" Return -(N). 336 &ascii "S" Return the ASCII code of the first 337- character in "S" 338+ character in "S" 339 &random "N" 340 &rnd "N" Random number between 1 and N 341 &abs "N" Absolute value of "N" 342@@ -791,12 +791,12 @@ 343 The rest return strings: 344 345 &bind "S" Return the function name bound to the 346- key sequence "S". 347+ key sequence "S". 348 &cat "S1" "S2" Concatenate S1 and string "S". 349 &chr "N" Converts numeric "N" to an ASCII character. 350 &cclass "S" Character class (see "show-printable") 351 &env "S" Return the value of the user's environment 352- variable named "S". 353+ variable named "S". 354 >key Get a single raw keystroke from the user. 355 >sequence Get a complete vile key sequence from user. 356 &left "S" "N" Extract first "N" characters from "S" 357@@ -805,8 +805,8 @@ 358 &middle "S" "N1" "N2" Extract "N2" chars at position "N1". 359 &upper "S" Return uppercase version of "S". 360 &trim "S" Remove whitespace at either end of "S", 361- reduce multiple spaces within "S" 362- to just one space each. 363+ reduce multiple spaces within "S" 364+ to just one space each. 365 366 Boolean/logical functions -- 367 368@@ -820,6 +820,9 @@ 369 &geq "N1" "N2" Is "N1" numerically not less than "N2"? 370 &greater "N1" "N2" Is "N1" numerically greater than "N2"? 371 > "N1" "N2" (same as &greater) 372+ &isa "C" "N" Is "N" a member of class "C". Classes 373+ include: buffer, color, mode, submode, 374+ Majormode. 375 &leq "N1" "N2" Is "N1" numerically not greater than "N2"? 376 &lessthan "N1" "N2" Is "N1" numerically less than "N2"? 377 < "N1" "N2" (same as &lessthan) 378@@ -860,19 +863,26 @@ 379 380 These all return string values: 381 382+ &classof "N" Retrieves the class(es) to which the given 383+ name may return. Usually this is a single 384+ name, e.g., one of those checked by &isa. 385+ If multiple matches are found, the result 386+ contains each classname separated by a 387+ space. 388+ 389 &default "MODENAME" Retrieves initial/default value for the 390- given mode or state variable. 391+ given mode or state variable. 392 393 &global "MODENAME" Retrieves universal/global mode setting. 394 395- &indirect "S" Evaluate value of "S" as a 396- macro language variable itself. 397- Thus if %foo has value "HOME", 398- then &env &indirect %foo will 399- return the home directory pathname. 400+ &indirect "S" Evaluate value of "S" as a macro language 401+ variable itself. Thus if %foo has value 402+ "HOME", then 403+ &env &indirect %foo 404+ will return the home directory pathname. 405 406 &local "MODENAME" Retrieves local mode setting (for 407- current buffer). 408+ current buffer). 409 410 &lookup "N" "P" The "N" keyword tells which field to use 411 looking for the file "P": 412@@ -890,25 +900,31 @@ 413 bin, startup, path, libdir. Note that 414 the directory lists may overlap. 415 416+ &mclass "M" Retrieve the class to which the given 417+ mode belongs. This is different from 418+ &mclass since it distinguishes the modes 419+ Return values include: universal buffer 420+ window submode Majormode. 421+ 422 &qpasswd "S" Present "S" to the user and return their 423- response. Each typed character is 424- echoed as '*'. The response is not 425- recallable via the editor's history 426- mechanism. 427+ response. Each typed character is 428+ echoed as '*'. The response is not 429+ recallable via the editor's history 430+ mechanism. 431 432 &query "S" Present "S" to the user, and return 433- their typed response. 434+ their typed response. 435 436 &date "F" "T" If strftime() is found, format the time "T" 437- using the "F" format. Otherwise, use 438- ctime() to format the time. Times are 439- numbers (see &ftime and &stime). 440+ using the "F" format. Otherwise, use 441+ ctime() to format the time. Times are 442+ numbers (see &ftime and &stime). 443 444 &dquery "S" "D" Present "S" to the user, and return 445- their typed response. If "D" is given, 446- use that as the default response. 447- Otherwise use the previous response 448- as the default. 449+ their typed response. If "D" is given, 450+ use that as the default response. 451+ Otherwise use the previous response 452+ as the default. 453 454 &path "N" "P" The "N" keyword tells which field to extract 455 from the pathname "P": 456@@ -1056,7 +1072,6 @@ 457 The ~break directive allows early termination of an enclosing 458 while-loop. Extending the above example: 459 460- 461 ; count the occurrences of a pattern in all buffers 462 set nowrapscan 463 set noautobuffer 464@@ -1465,6 +1480,6 @@ 465 ========================= end vile.rc ======================= 466 467 ----------------------------------- 468- @Header: /usr/build/vile/vile/doc/RCS/macros.doc,v 1.93 2004/10/20 22:47:38 tom Exp @ 469+ @Header: /usr/build/vile/vile/doc/RCS/macros.doc,v 1.94 2004/12/12 20:29:24 tom Exp @ 470 ----------------------------------- 471 472