Commit 602ea69d authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/progmodes/octave-mod.el (octave-in-comment-p, octave-in-string-p)

(octave-not-in-string-or-comment-p): Use syntax-ppss so it works with
multi-line comments as well.
parent 06b60517
2011-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/octave-mod.el (octave-in-comment-p, octave-in-string-p)
(octave-not-in-string-or-comment-p): Use syntax-ppss so it works with
multi-line comments as well.
2011-04-19 Juanma Barranquero <lekktu@gmail.com>
Lexical-binding cleanup.
......
......@@ -668,20 +668,15 @@ Look up symbol in the function, operator and variable indices of the info files.
(defsubst octave-in-comment-p ()
"Return t if point is inside an Octave comment."
(save-excursion
;; FIXME: use syntax-ppss?
(nth 4 (parse-partial-sexp (line-beginning-position) (point)))))
(nth 4 (syntax-ppss)))
(defsubst octave-in-string-p ()
"Return t if point is inside an Octave string."
(save-excursion
;; FIXME: use syntax-ppss?
(nth 3 (parse-partial-sexp (line-beginning-position) (point)))))
(nth 3 (syntax-ppss)))
(defsubst octave-not-in-string-or-comment-p ()
"Return t if point is not inside an Octave string or comment."
;; FIXME: Use syntax-ppss?
(let ((pps (parse-partial-sexp (line-beginning-position) (point))))
(let ((pps (syntax-ppss)))
(not (or (nth 3 pps) (nth 4 pps)))))
......@@ -698,7 +693,6 @@ Look up symbol in the function, operator and variable indices of the info files.
nil
(delete-horizontal-space)
(insert (concat " " octave-continuation-string))))
;;; Indentation
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment