* lisp/progmodes/octave.el (octave-smie-forward-token): Properly skip

\n and comment, even if it's not an implicit ;.

Fixes: debbugs:14218
This commit is contained in:
Stefan Monnier 2013-04-26 10:34:26 -04:00
parent 57829a28c8
commit e53052d3bf
2 changed files with 14 additions and 8 deletions

View file

@ -1,3 +1,8 @@
2013-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/octave.el (octave-smie-forward-token): Properly skip
\n and comment, even if it's not an implicit ; (bug#14218).
2013-04-26 Glenn Morris <rgm@gnu.org>
* subr.el (read-number): Once more use `read' rather than
@ -20,7 +25,7 @@
* progmodes/octave.el (octave-submit-bug-report): Obsolete.
(octave-mode, inferior-octave-mode): Use setq-local.
(octave-not-in-string-or-comment-p): Renamed to
(octave-not-in-string-or-comment-p): Rename to
octave-in-string-or-comment-p.
(octave-in-comment-p, octave-in-string-p)
(octave-in-string-or-comment-p): Replace defsubst with defun.
@ -36,8 +41,8 @@
2013-04-25 Leo Liu <sdl.web@gmail.com>
* progmodes/octave.el (octave-completion-at-point-function): Make
use of inferior octave process.
* progmodes/octave.el (octave-completion-at-point-function):
Make use of inferior octave process.
(octave-initialize-completions): Remove.
(inferior-octave-completion-table): New function.
(inferior-octave-completion-at-point): Use it.

View file

@ -461,11 +461,12 @@ Non-nil means always go to the next Octave code line after sending."
(forward-comment 1))
(cond
((and (looking-at "$\\|[%#]")
(not (smie-rule-bolp))
;; Ignore it if it's within parentheses.
(prog1 (let ((ppss (syntax-ppss)))
(not (and (nth 1 ppss)
(eq ?\( (char-after (nth 1 ppss))))))
;; Ignore it if it's within parentheses or if the newline does not end
;; some preceding text.
(prog1 (and (not (smie-rule-bolp))
(let ((ppss (syntax-ppss)))
(not (and (nth 1 ppss)
(eq ?\( (char-after (nth 1 ppss)))))))
(forward-comment (point-max))))
;; Why bother distinguishing \n and ;?
";") ;;"\n"