]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/octave.el (octave-smie-forward-token): Properly skip
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 26 Apr 2013 14:34:26 +0000 (10:34 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 26 Apr 2013 14:34:26 +0000 (10:34 -0400)
\n and comment, even if it's not an implicit ;.

Fixes: debbugs:14218
lisp/ChangeLog
lisp/progmodes/octave.el

index 340dc41a744f3db0fbaf80bbfa9be8a3a16bb9b9..e236b923932726ffb212f89dd5604e69dcb481c8 100644 (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.
index 640775bfe8b9b16cc5898f8911aa0f8ee153353b..c5f83a5065449f50b6c8de1aefa30de8ccac206a 100644 (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"