aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2013-04-26 10:34:26 -0400
committerStefan Monnier2013-04-26 10:34:26 -0400
commite53052d3bf33296268db3aadcf5531f69f8e55ae (patch)
tree34c93b49d1b4adf67b547bd18d596b8ad681d032
parent57829a28c8888e702643cc4d45d63337d161240f (diff)
downloademacs-e53052d3bf33296268db3aadcf5531f69f8e55ae.tar.gz
emacs-e53052d3bf33296268db3aadcf5531f69f8e55ae.zip
* lisp/progmodes/octave.el (octave-smie-forward-token): Properly skip
\n and comment, even if it's not an implicit ;. Fixes: debbugs:14218
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/progmodes/octave.el11
2 files changed, 14 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 340dc41a744..e236b923932 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * progmodes/octave.el (octave-smie-forward-token): Properly skip
4 \n and comment, even if it's not an implicit ; (bug#14218).
5
12013-04-26 Glenn Morris <rgm@gnu.org> 62013-04-26 Glenn Morris <rgm@gnu.org>
2 7
3 * subr.el (read-number): Once more use `read' rather than 8 * subr.el (read-number): Once more use `read' rather than
@@ -20,7 +25,7 @@
20 25
21 * progmodes/octave.el (octave-submit-bug-report): Obsolete. 26 * progmodes/octave.el (octave-submit-bug-report): Obsolete.
22 (octave-mode, inferior-octave-mode): Use setq-local. 27 (octave-mode, inferior-octave-mode): Use setq-local.
23 (octave-not-in-string-or-comment-p): Renamed to 28 (octave-not-in-string-or-comment-p): Rename to
24 octave-in-string-or-comment-p. 29 octave-in-string-or-comment-p.
25 (octave-in-comment-p, octave-in-string-p) 30 (octave-in-comment-p, octave-in-string-p)
26 (octave-in-string-or-comment-p): Replace defsubst with defun. 31 (octave-in-string-or-comment-p): Replace defsubst with defun.
@@ -36,8 +41,8 @@
36 41
372013-04-25 Leo Liu <sdl.web@gmail.com> 422013-04-25 Leo Liu <sdl.web@gmail.com>
38 43
39 * progmodes/octave.el (octave-completion-at-point-function): Make 44 * progmodes/octave.el (octave-completion-at-point-function):
40 use of inferior octave process. 45 Make use of inferior octave process.
41 (octave-initialize-completions): Remove. 46 (octave-initialize-completions): Remove.
42 (inferior-octave-completion-table): New function. 47 (inferior-octave-completion-table): New function.
43 (inferior-octave-completion-at-point): Use it. 48 (inferior-octave-completion-at-point): Use it.
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index 640775bfe8b..c5f83a50654 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -461,11 +461,12 @@ Non-nil means always go to the next Octave code line after sending."
461 (forward-comment 1)) 461 (forward-comment 1))
462 (cond 462 (cond
463 ((and (looking-at "$\\|[%#]") 463 ((and (looking-at "$\\|[%#]")
464 (not (smie-rule-bolp)) 464 ;; Ignore it if it's within parentheses or if the newline does not end
465 ;; Ignore it if it's within parentheses. 465 ;; some preceding text.
466 (prog1 (let ((ppss (syntax-ppss))) 466 (prog1 (and (not (smie-rule-bolp))
467 (not (and (nth 1 ppss) 467 (let ((ppss (syntax-ppss)))
468 (eq ?\( (char-after (nth 1 ppss)))))) 468 (not (and (nth 1 ppss)
469 (eq ?\( (char-after (nth 1 ppss)))))))
469 (forward-comment (point-max)))) 470 (forward-comment (point-max))))
470 ;; Why bother distinguishing \n and ;? 471 ;; Why bother distinguishing \n and ;?
471 ";") ;;"\n" 472 ";") ;;"\n"