# HG changeset patch # User jwe # Date 872524378 0 # Node ID 8c779ed7979b21d2e4e5b6d4d2adcb71568f946e # Parent 4a324ba3f1eb74a5e3528b72e58756b52ef4cc45 [project @ 1997-08-25 15:51:20 by jwe] diff -r 4a324ba3f1eb -r 8c779ed7979b ChangeLog --- a/ChangeLog Fri Aug 22 20:53:39 1997 +0000 +++ b/ChangeLog Mon Aug 25 15:52:58 1997 +0000 @@ -1,3 +1,8 @@ +Wed Aug 13 20:34:14 1997 John W. Eaton + + * emacs/octave-mod.el (octave-before-magic-comment-p): New function. + (calculate-octave-indent, octave-comment-indent): Use it. + Sun Aug 3 15:33:18 1997 John W. Eaton * info: Delete subdirectory. diff -r 4a324ba3f1eb -r 8c779ed7979b PROJECTS --- a/PROJECTS Fri Aug 22 20:53:39 1997 +0000 +++ b/PROJECTS Mon Aug 25 15:52:58 1997 +0000 @@ -248,6 +248,12 @@ succeeds, even when implicit_str_to_num_ok is 0 at the time the function is parsed. + * Fix the parser so that + + if (expr) 'this is a string' end + + is parsed as IF expr STRING END. + * Consider making x(:) work no matter what the value of do_fortran_indexing. diff -r 4a324ba3f1eb -r 8c779ed7979b emacs/octave-mod.el --- a/emacs/octave-mod.el Fri Aug 22 20:53:39 1997 +0000 +++ b/emacs/octave-mod.el Mon Aug 25 15:52:58 1997 +0000 @@ -655,7 +655,8 @@ ((and (looking-at octave-block-end-regexp) (octave-not-in-string-or-comment-p)) (setq icol (- icol (octave-block-end-offset)))) - ((looking-at "\\s<\\s<\\s<\\S<") + ((or (looking-at "\\s<\\s<\\s<\\S<") + (octave-before-magic-comment-p)) (setq icol (list 0 icol))) ((looking-at "\\s<\\S<") (setq icol (list comment-column icol))))) @@ -667,8 +668,14 @@ (* octave-block-offset (if (string-match (match-string 0) "switch") 2 1)))) +(defun octave-before-magic-comment-p () + (save-excursion + (beginning-of-line) + (and (bobp) (looking-at "\\s-*#!")))) + (defun octave-comment-indent () - (if (looking-at "\\s<\\s<\\s<") + (if (or (looking-at "\\s<\\s<\\s<") + (octave-before-magic-comment-p)) 0 (if (looking-at "\\s<\\s<") (calculate-octave-indent) diff -r 4a324ba3f1eb -r 8c779ed7979b scripts/ChangeLog --- a/scripts/ChangeLog Fri Aug 22 20:53:39 1997 +0000 +++ b/scripts/ChangeLog Mon Aug 25 15:52:58 1997 +0000 @@ -1,3 +1,8 @@ +Wed Aug 13 14:14:16 1997 John W. Eaton + + * strings/blanks.m: Allow blanks(0) to return empty string. + Allow negative arguments if treat_neg_dim_as_zero is true. + Wed Jun 25 21:26:24 1997 John W. Eaton * plot/mesh.m: Set noparametric plot mode after plotting. diff -r 4a324ba3f1eb -r 8c779ed7979b scripts/strings/blanks.m --- a/scripts/strings/blanks.m Fri Aug 22 20:53:39 1997 +0000 +++ b/scripts/strings/blanks.m Mon Aug 25 15:52:58 1997 +0000 @@ -30,10 +30,10 @@ usage ("blanks (n)"); endif - if (is_scalar (n) && n > 0 && n == round (n)) + if (is_scalar (n) && n == round (n) && (treat_neg_dim_as_zero || n >= 0)) s = setstr (ones (1, n) * toascii (" ")); else - error ("blanks: n must be a positive integer"); + error ("blanks: n must be a non-negative integer"); endif endfunction diff -r 4a324ba3f1eb -r 8c779ed7979b src/ChangeLog --- a/src/ChangeLog Fri Aug 22 20:53:39 1997 +0000 +++ b/src/ChangeLog Mon Aug 25 15:52:58 1997 +0000 @@ -1,3 +1,8 @@ +Mon Aug 25 10:42:07 1997 John W. Eaton + + * input.cc (get_user_input): Return an empty string if the user + just types RET. + Thu Jul 31 22:59:04 1997 John W. Eaton * lex.l : Ensure that we handle words that begin with diff -r 4a324ba3f1eb -r 8c779ed7979b src/DLD-FUNCTIONS/lsode.cc --- a/src/DLD-FUNCTIONS/lsode.cc Fri Aug 22 20:53:39 1997 +0000 +++ b/src/DLD-FUNCTIONS/lsode.cc Mon Aug 25 15:52:58 1997 +0000 @@ -185,7 +185,7 @@ break; default: - error ("lsode: second arg should be a string or 2-element string array"); + error ("lsode: first arg should be a string or 2-element string array"); break; } diff -r 4a324ba3f1eb -r 8c779ed7979b src/input.cc --- a/src/input.cc Fri Aug 22 20:53:39 1997 +0000 +++ b/src/input.cc Mon Aug 25 15:52:58 1997 +0000 @@ -531,7 +531,11 @@ } else if (read_as_string) { - retval = input_buf; + // XXX FIXME XXX -- fix gnu_readline and octave_gets instead! + if (input_buf.length () == 1 && input_buf[0] == '\n') + retval = ""; + else + retval = input_buf; } else {