diff --git a/bin/limp-hyperspec.pl b/bin/limp-hyperspec.pl index 868ef3a..e2313c8 100755 --- a/bin/limp-hyperspec.pl +++ b/bin/limp-hyperspec.pl @@ -111,7 +111,7 @@ sub gen_file sub browse { my( $browser_running, $match_type, $orig_symbol, $match_on, $pat, $make_page ) = @_; - my( %done, $pid, $url, $word, $fh, $filename, $do_wait, $do_read, + my( %done, $pid, $url, $word, $fh, $filename, $do_wait, $do_read, @keys, $dummy, $started, $num_deleted, $sleep_time ); while (<>) @@ -267,7 +267,7 @@ sub main my( $type, $make_page, $symbol, $first, $browser_running ); # global - $forked_to_background = + $forked_to_background = $external && !$make_page && !$READLINE_ON_BROWSER_START; $| = 1; @@ -292,8 +292,8 @@ sub main @ARGV = glob( "$BASE/Front/X_Perm_*.htm" ); - if ($type eq "exact") { &browse( $browser_running, $type, $orig_symbol, $symbol, "#$symbol\"", $make_page ); } - elsif ($type eq "prefix") { &browse( $browser_running, $type, $orig_symbol, $symbol, "#$symbol", $make_page ); } + if ($type eq "exact") { &browse( $browser_running, $type, $orig_symbol, $symbol, "#$symbol\"", $make_page ); } + elsif ($type eq "prefix") { &browse( $browser_running, $type, $orig_symbol, $symbol, "#$symbol", $make_page ); } elsif ($type eq "suffix") { &browse( $browser_running, $type, $orig_symbol, $symbol, "#[^\"]*" . $symbol . "\"", $make_page ); } elsif ($type eq "grep") { &browse( $browser_running, $type, $orig_symbol, $symbol, "#[^\"]*" . $symbol . "[^\"]*\"", $make_page ); } elsif ($type eq "index") diff --git a/bin/lisp.sh b/bin/lisp.sh index e7a188d..cc251e1 100755 --- a/bin/lisp.sh +++ b/bin/lisp.sh @@ -18,7 +18,7 @@ VERSION=0.3.5-pre if [[ "$LIMPRUNTIME" = "" ]]; then LIMPDIR=$(cd $(dirname $0) ; pwd) -else +else LIMPDIR=${LIMPRUNTIME:-/usr} fi @@ -85,29 +85,29 @@ LIMP_SCREENRC="" # created at runtime to boot Lisp LIMP_SCREEN_STY_FILE="" # temp file used to grab the STY of the last created screen while [ $# -gt 0 ]; do - case $1 in + case $1 in -h) print_version; print_help; exit 0;; -v) print_version; exit 0;; -b) BOOT=1; shift;; - -c) case "$2" in + -c) case "$2" in "") shift 2;; *) CORE_PATH=$2; shift 2;; esac ;; -l) list_running_lisps exit 0;; -s) case "$2" in - "") echo "-s must be given a file to write the screen ID to"; + "") echo "-s must be given a file to write the screen ID to"; exit 1;; *) LIMP_SCREEN_STY_FILE=$2; shift 2;; esac ;; # magic! -p) DO_BOOT=1; - case "$2" in - "") echo "-p must be given a file containing the STY of the last screen process"; + case "$2" in + "") echo "-p must be given a file containing the STY of the last screen process"; exit 1;; *) LIMP_SCREEN_STY_FILE=$2; shift 2;; esac ;; - -P) case "$2" in + -P) case "$2" in "") echo "-P must be given a file containing the screenrc"; exit 1;; *) LIMP_SCREENRC=$2; shift 2;; esac ;; @@ -121,7 +121,7 @@ NAME="$1" # # this is executed from inside the screen -# +# if [[ "$DO_BOOT" == "1" ]]; then id=$(echo $STY | cut -d '.' -f 1) @@ -156,14 +156,14 @@ if [[ "$DO_BOOT" == "1" ]]; then echo -e "Welcome to Limp. May your journey be pleasant.\n" $RLWRAP $SBCL --noinform $core - # cleanup + # cleanup rm -rf "$LIMP_BRIDGE_CHANNEL" rm -rf "$LIMP_SCREENRC" # # first part of the Lisp screen startup # elif [[ "$BOOT" == "1" ]]; then - + if [[ "$NAME" == "" ]]; then echo "Sorry, must name your Lisp." print_help @@ -173,7 +173,7 @@ elif [[ "$BOOT" == "1" ]]; then # Check if a lisp with this name is already running for l in $(list_running_lisps | awk {' print $1 '}) do - if [[ $l = $NAME ]]; then + if [[ $l = $NAME ]]; then echo "A lisp with the name $NAME is running!" >&2 list_running_lisps >&2 exit 1 @@ -227,7 +227,7 @@ elif [[ "$BOOT" == "1" ]]; then echo "screen -t Lisp 0 $LIMPDIR/$progname $core_opt -P $initfile -p $styfile" >> $initfile - screen -c $initfile -dmS limp_listener-$NAME + screen -c $initfile -dmS limp_listener-$NAME # wait for the styfile to become available timer=0 diff --git a/bin/regenerate-hyperspec-thesaurus.pl b/bin/regenerate-hyperspec-thesaurus.pl index 4ef7b2e..5623b6e 100755 --- a/bin/regenerate-hyperspec-thesaurus.pl +++ b/bin/regenerate-hyperspec-thesaurus.pl @@ -8,8 +8,8 @@ sub process_word { my( $word ) = @_; - my( - $n, + my( + $n, $len, $substr ); @@ -62,7 +62,7 @@ sub main &process_word( $word ); } - foreach $word (sort( { length( $a ) <=> length( $b ) + foreach $word (sort( { length( $a ) <=> length( $b ) || $a cmp $b } @words )) { @@ -72,10 +72,10 @@ sub main foreach $key (sort keys %matches) { - $out = join( " ", - $key, - sort( { length( $a ) <=> length( $b ) - || $a cmp $b } + $out = join( " ", + $key, + sort( { length( $a ) <=> length( $b ) + || $a cmp $b } @{ $matches{ $key } } ) ); print $out, "\n" if (length( $out ) <= $MAX_LINE); diff --git a/docs/index.txt b/docs/index.txt index 797816a..8c2d8c5 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -208,7 +208,7 @@ You can save your Lisp's state and later restore it. Very handy. .. figure:: screenshots/save-lisp-and-die.png Here, I've booted up a fresh Lisp and evaluated the function definition. - Then, ```` asks for the path of a file to save the core in. + Then, ```` asks for the path of a file to save the core in. The Lisp core is now frozen in time. .. figure:: screenshots/custom-core.png @@ -295,7 +295,7 @@ $external Opera's "new-page" argument to openURL gives each set of HyperSpec search results a new page. Other browsers may have analogous flags, and - similar behavior. + similar behavior. ``limp-hyperspec.pl`` replaces %s in @browser_args with the URL to be opened. See @@ -333,14 +333,14 @@ Name Expansion There's a convention to talk about dashed names by abbreviating them into the first letter of each word, e.g.: .. figure:: screenshots/name-expansion.png - + First, type this in Vim... .. figure:: screenshots/name-expansion-popup.png Then, hitting ^N^N (Ctrl-N twice) will expand the ``p-n`` to ``package-name``. ^N again will replace ``package-name`` with ``pathname-name``, - and ^N yet again will replace that with ``pprint-newline``. See Vim help for + and ^N yet again will replace that with ``pprint-newline``. See Vim help for ``complete``, ``compl-generic``, and ``i_CTRL-X_CTRL-T``. Also, see below for notes on this facility. @@ -369,7 +369,7 @@ that instead of the default keys used for completion! Commands ~~~~~~~~~ -Limp defines a buffer-level command, ``:Eval``. +Limp defines a buffer-level command, ``:Eval``. ``:Eval `` will evaluate an s-exp, e.g.:: @@ -439,7 +439,7 @@ Source transformation. * ``\mt``: *(Mark Top)*: Mark the current form to the top level * ``\fc``: *(Format Current)*: Reindent/format current form -* ``\ft``: *(Format current Top level form)*: Reindent/format current form to the top level +* ``\ft``: *(Format current Top level form)*: Reindent/format current form to the top level * ``\sw``: *(S-exp Wrap)*: Wrap the current form inside another list * ``\sp``: *(S-exp Peel)*: Peel off a list around the current s-exp * ``\sc`` :*(S-exp Comment top)*: Comment top form @@ -585,7 +585,7 @@ Version 0.2 Version 0.1 ~~~~~~~~~~~ -* 2008-04-21 by Mikael Jansson +* 2008-04-21 by Mikael Jansson Internal release diff --git a/package.sh b/package.sh index 821f946..fd837df 100755 --- a/package.sh +++ b/package.sh @@ -17,7 +17,7 @@ cp -r bin vim $INSTALL cp -r install.sh $PACKAGE echo "Removing Subversion files." -find $PACKAGE -name .svn -type d -exec rm -rf "{}" 2> /dev/null \; +find $PACKAGE -name .svn -type d -exec rm -rf "{}" 2> /dev/null \; echo "Packing..." tar czf ${PACKAGE}.tar.gz $PACKAGE diff --git a/sandbox/clientserver/client.vim b/sandbox/clientserver/client.vim index 7bfa563..fbe711f 100644 --- a/sandbox/clientserver/client.vim +++ b/sandbox/clientserver/client.vim @@ -5,15 +5,15 @@ " :Tool "hello, world" " :messages -"Get to know each other -call remote_expr("SERVER","1","serverid") +"Get to know each other +call remote_expr("SERVER","1","serverid") -augroup server - au! - "Do something with the reply - au RemoteReply * echom remote_read(g:serverid) -augroup END +augroup server + au! + "Do something with the reply + au RemoteReply * echom remote_read(g:serverid) +augroup END -"Send messages via SERVER +"Send messages via SERVER com! -nargs=* Server :call server2client(g:serverid,) diff --git a/sandbox/clientserver/server.vim b/sandbox/clientserver/server.vim index a452641..c298f49 100644 --- a/sandbox/clientserver/server.vim +++ b/sandbox/clientserver/server.vim @@ -5,16 +5,16 @@ " :let data = ReceiveDataBlocking() " :echo data -"Get to know each other -call remote_expr("CLIENT","1","clientid") +"Get to know each other +call remote_expr("CLIENT","1","clientid") -func! ReceiveDataBlocking() - "called from your tool, blocks till msg is available - return remote_read(g:clientid) -endfun +func! ReceiveDataBlocking() + "called from your tool, blocks till msg is available + return remote_read(g:clientid) +endfun -func! Reply(msg) - "called by the tool to reply - call server2client(g:clientid,a:msg) +func! Reply(msg) + "called by the tool to reply + call server2client(g:clientid,a:msg) endfun diff --git a/sandbox/lisphelptags/helptags-recognizing-lisp-names.diff b/sandbox/lisphelptags/helptags-recognizing-lisp-names.diff index 6e938d0..ce5cfe5 100644 --- a/sandbox/lisphelptags/helptags-recognizing-lisp-names.diff +++ b/sandbox/lisphelptags/helptags-recognizing-lisp-names.diff @@ -24,7 +24,7 @@ Index: src/ex_cmds.c @@ -6398,6 +6408,10 @@ ++ga.ga_len; sprintf((char *)s, "%s\t%s", p1, fname); - + + /* take care of the Lisp case */ + if (*(p2+1) == '*') + p2++; diff --git a/sandbox/vimff-20071129/vimrc b/sandbox/vimff-20071129/vimrc index 1e93c58..ee7744a 100644 --- a/sandbox/vimff-20071129/vimrc +++ b/sandbox/vimff-20071129/vimrc @@ -1,5 +1,5 @@ set ai -set lisp +set lisp set expandtab syntax on @@ -17,7 +17,7 @@ function Startlisp() :shell endfunction -function Perly() +function Perly() perl << HEREDOC use strict; use IO::Socket; @@ -121,7 +121,7 @@ close $sock; HEREDOC endfunction -function LispGotoFunction() +function LispGotoFunction() perl << HEREDOC use strict; use IO::Socket; @@ -151,7 +151,7 @@ if($#tmp == 0){ HEREDOC endfunction -function Lisphelpexpr() +function Lisphelpexpr() perl << HEREDOC use strict; use IO::Socket; @@ -176,7 +176,7 @@ VIM::DoCommand(":tabnew /tmp/vimff-help.txt"); HEREDOC endfunction -function Lispcomplete() +function Lispcomplete() perl << HEREDOC use strict; use IO::Socket; diff --git a/sandbox/vimff-20071129/vimrc-swank.pl b/sandbox/vimff-20071129/vimrc-swank.pl index ea4c282..dc8b18d 100644 --- a/sandbox/vimff-20071129/vimrc-swank.pl +++ b/sandbox/vimff-20071129/vimrc-swank.pl @@ -1,5 +1,5 @@ set ai -set lisp +set lisp set expandtab syntax on @@ -26,7 +26,7 @@ endfunction -function Perly() +function Perly() perl << HEREDOC use strict; use IO::Socket; @@ -130,7 +130,7 @@ HEREDOC endfunction -function LispGotoFunction() +function LispGotoFunction() perl << HEREDOC use strict; use IO::Socket; @@ -160,7 +160,7 @@ HEREDOC endfunction -function Lisphelpexpr() +function Lisphelpexpr() perl << HEREDOC use strict; use IO::Socket; @@ -185,7 +185,7 @@ HEREDOC endfunction -function Lispcomplete() +function Lispcomplete() perl << HEREDOC use strict; use IO::Socket; diff --git a/vim/autoclose.vim b/vim/autoclose.vim index ceaae7b..a75a83e 100644 --- a/vim/autoclose.vim +++ b/vim/autoclose.vim @@ -1,4 +1,4 @@ -" +" " limp/vim/autoclose.vim " " URL: diff --git a/vim/cursor.vim b/vim/cursor.vim index 2890f8f..6c022ac 100644 --- a/vim/cursor.vim +++ b/vim/cursor.vim @@ -1,4 +1,4 @@ -" +" " limp/vim/cursor.vim " " URL: @@ -18,7 +18,7 @@ " Charles E. Campbell, Jr. -NOSPAM " " Changelog: -" 2008-04-18 +" 2008-04-18 " * Removed all leader mappings " " Usage: @@ -179,22 +179,22 @@ endfun " --------------------------------------------------------------------- " ListWinPosn: -"fun! ListWinPosn() " Decho -" if !exists("b:cursor_position_index") || b:cursor_position_index == 0 " Decho +"fun! ListWinPosn() " Decho +" if !exists("b:cursor_position_index") || b:cursor_position_index == 0 " Decho " call Decho("nothing on SWP stack") " Decho " else " Decho -" let jwinposn= b:cursor_position_index " Decho -" while jwinposn >= 1 " Decho -" if exists("b:cursor_position{jwinposn}") " Decho -" call Decho("winposn{".jwinposn."}<".b:cursor_position{jwinposn}.">") " Decho -" else " Decho -" call Decho("winposn{".jwinposn."} -- doesn't exist") " Decho -" endif " Decho -" let jwinposn= jwinposn - 1 " Decho -" endwhile " Decho +" let jwinposn= b:cursor_position_index " Decho +" while jwinposn >= 1 " Decho +" if exists("b:cursor_position{jwinposn}") " Decho +" call Decho("winposn{".jwinposn."}<".b:cursor_position{jwinposn}.">") " Decho +" else " Decho +" call Decho("winposn{".jwinposn."} -- doesn't exist") " Decho +" endif " Decho +" let jwinposn= jwinposn - 1 " Decho +" endwhile " Decho " endif " Decho -"endfun " Decho -"com! -nargs=0 LWP call ListWinPosn() " Decho +"endfun " Decho +"com! -nargs=0 LWP call ListWinPosn() " Decho " --------------------------------------------------------------------- diff --git a/vim/highlight.vim b/vim/highlight.vim index 5cd72e2..669f335 100644 --- a/vim/highlight.vim +++ b/vim/highlight.vim @@ -1,4 +1,4 @@ -" +" " limp/vim/highlight.vim " " URL: @@ -21,14 +21,14 @@ " 2008-04-25 " * Fixed regressions. Now properly highlights blocks again. " -" 2008-04-18 +" 2008-04-18 " * Removed all mappings " * Removed < 7.00 compatibility " * Renamed to Lim-Highlight " * Changed from Search to Brackets[Block] " " Usage: {{{1 -" Before loading: +" Before loading: " let g:LimpHighlight = 1 " or after loading: " call LimpHighlight_start() @@ -84,12 +84,12 @@ fun! LimpHighlight_stop() endif match none 2match none - + " remove cursorhold event for highlighting matching bracket augroup LimpHighlight au! augroup END - + let &ww = s:wwkeep set nolz endfun @@ -183,7 +183,7 @@ fun! LimpHighlight_handler() 2match none endif endif - + " restore let &magic = magickeep let @" = regdq diff --git a/vim/keys.vim b/vim/keys.vim index 9ff3a01..0aa1dac 100644 --- a/vim/keys.vim +++ b/vim/keys.vim @@ -1,4 +1,4 @@ -" +" " limp/vim/keys.vim " " Description: @@ -25,7 +25,7 @@ vmap ec EvalBlock vmap ex EvalBlock " SBCL Abort Reset: abort from the debugger -nmap ar AbortReset +nmap ar AbortReset " Abort Interrupt: send ^C to interpreter nmap ai AbortInterrupt @@ -38,12 +38,12 @@ nmap tt TestTop " Load File: load /this/ file into Lisp " Load Any File: load whichever version of this file (.lisp not given) nmap lf LoadThisFile -nmap la LoadAnyFile +nmap la LoadAnyFile " Compile File: compile the current file " Compile Load File: compile, then load the current file nmap cf CompileFile -nmap cl CompileAndLoadFile +nmap cl CompileAndLoadFile " Goto Test Buffer: " Goto Split: split current buffer and goto test buffer @@ -51,7 +51,7 @@ nmap gt GotoTestBuffer nmap gs GotoTestBufferAndSplit " Goto Last: return to last Lisp buffer -nmap gl GotoLastLispBuffer +nmap gl GotoLastLispBuffer " HyperSpec: nmap he HyperspecExact @@ -69,7 +69,7 @@ nmap hd HelpDescribe nmap mt MarkTop " Format Current: reindent/format -" Format Top: +" Format Top: nmap fc FormatCurrent nmap ft FormatTop diff --git a/vim/limp.vim b/vim/limp.vim index 8c5a2ec..314ec87 100644 --- a/vim/limp.vim +++ b/vim/limp.vim @@ -1,4 +1,4 @@ -" +" " limp/vim/limp.vim " " URL: diff --git a/vim/mode.vim b/vim/mode.vim index 653b3e8..cf06833 100644 --- a/vim/mode.vim +++ b/vim/mode.vim @@ -1,11 +1,11 @@ -" +" " limp/vim/mode.vim " " URL: " http://mikael.jansson.be " " Description: -" Lisp-mode specific functions +" Lisp-mode specific functions " " Authors: " Mikael Jansson @@ -32,7 +32,7 @@ fun! LimpMode_start() colorscheme desert256 endif - hi Brackets ctermbg=53 ctermfg=white + hi Brackets ctermbg=53 ctermfg=white hi BracketsBlock ctermbg=235 guibg=lightgray hi StatusLine ctermbg=white ctermfg=160 hi StatusLineNC ctermbg=black ctermfg=gray @@ -82,7 +82,7 @@ augroup END syntax on setlocal nocompatible nocursorline setlocal lisp syntax=lisp -setlocal ls=2 bs=2 si et sw=2 ts=2 tw=0 +setlocal ls=2 bs=2 si et sw=2 ts=2 tw=0 setlocal statusline=%<%f\ \(%{LimpBridge_connection_status()}\)\ %h%m%r%=%-14.(%l,%c%V%)\ %P\ of\ %L\ \(%.45{getcwd()}\) setlocal iskeyword=&,*,+,45,/,48-57,:,<,=,>,@,A-Z,a-z,_ setlocal cpoptions=-mp diff --git a/vim/sexp.vim b/vim/sexp.vim index 0dd5415..bdb8ead 100644 --- a/vim/sexp.vim +++ b/vim/sexp.vim @@ -1,4 +1,4 @@ -" +" " limp/vim/sexp.vim " " URL: @@ -25,7 +25,7 @@ nnoremap MarkTop 99[(V% " Format Current: reindent/format -" Format Top: +" Format Top: nnoremap FormatCurrent [(=%`' nnoremap FormatTop 99[(=%`' @@ -96,7 +96,7 @@ fun! Sexp_MoveBack() " Inside an s-exp? let [l, c] = searchpairpos('(', '', ')', 'bcnW') if l == 0 || c == 0 - " Nope, + " Nope, return endif @@ -120,7 +120,7 @@ fun! Sexp_MoveBack() " where prev_line2/prev_col2 = the ) of the previous match, and " this_line2/this_col2 = the ) of the current s-exp. " - + " so we can get back. silent! norm! ma let [b, this_line1, this_col1, o] = getpos('.') @@ -179,7 +179,7 @@ fun! Sexp_MoveBack() silent! exe 'norm! `a'.movement.'"bPl' silent! exe 'norm! '.len(@b).'x' - + silent! norm! `b else " different lines, so a simple paste will do @@ -198,7 +198,7 @@ fun! Sexp_MoveForward() " Inside an s-exp? let [l, c] = searchpairpos('(', '', ')', 'bcnW') if l == 0 || c == 0 - " Nope, + " Nope, return endif @@ -222,7 +222,7 @@ fun! Sexp_MoveForward() " where prev_line1/prev_col1 = the ( of the previous match, and " this_line1/this_col1 = the ( of the current s-exp. " - + " so we can get back. silent! norm! ma let [b, this_line1, this_col1, o] = getpos('.') @@ -281,7 +281,7 @@ fun! Sexp_MoveForward() silent! exe 'norm! `b'.movement.'"aPl' silent! exe 'norm! '.len(@a).'x' - + silent! exe 'norm! `b'.movement else " different lines, so a simple paste will do