Commit 9dbdb67e authored by Leo Liu's avatar Leo Liu
Browse files

* progmodes/octave.el (octave-indent-comment): New function.

(octave-mode): Use it in smie-indent-functions.

Fixes: debbugs:14350
parent 083fe0d7
......@@ -3,6 +3,8 @@
* progmodes/octave.el (octave-beginning-of-line)
(octave-end-of-line): Check before using up-list because it jumps
out of more syntactic contructs since moving to smie.
(octave-indent-comment): New function.
(octave-mode): Use it in smie-indent-functions. (Bug#14350)
2013-05-11 Glenn Morris <>
......@@ -414,6 +414,13 @@ Non-nil means always go to the next Octave code line after sending."
;; (if (smie-parent-p "switch") 4)
(defun octave-indent-comment ()
"A function for `smie-indent-functions' (which see)."
(when (and (looking-at-p "\\s<") (not (looking-at-p "\\s<\\s<")))
(defvar octave-font-lock-keywords
......@@ -488,6 +495,7 @@ definitions can also be stored in files and used in batch mode."
:forward-token #'octave-smie-forward-token
:backward-token #'octave-smie-backward-token)
(setq-local smie-indent-basic 'octave-block-offset)
(add-hook 'smie-indent-functions #'octave-indent-comment nil t)
(setq-local smie-blink-matching-triggers
(cons ?\; smie-blink-matching-triggers))
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