(octave-uncomment-region, octave-comment-indent)
(octave-indent-for-comment): Remove.
(octave-indent-calculate): Rename from calculate-octave-indent.
- (octave-indent-line): Update caller.
+ (octave-indent-line, octave-fill-paragraph): Update caller.
(octave-initialize-completions): No need to make an alist.
(octave-completion-at-point-function): New function.
(octave-complete-symbol): Use it.
(modify-syntax-entry ?\" "\"" table)
(modify-syntax-entry ?. "w" table)
(modify-syntax-entry ?_ "w" table)
- ;; FIXME: The < property of # and % makes Emacs-23 ignore any subsequent
- ;; char including {, so it never gets to see the multi-line comments.
- ;; This is a shortcoming in syntax.c. In Twelf-mode (which also suffers
- ;; from this problem) we work around the issue by setting "% " rather than
- ;; just "%" as a comment-starter, but it seems this wouldn't cut it
- ;; for Octave.
- ;; Hopefully we'll get to fix this in Emacs-24.
+ ;; FIXME: The "b" flag only applies to the second letter of the comstart
+ ;; and the first letter of the comend, i.e. the "4b" below is ineffective.
+ ;; If we try to put `b' on the single-line comments, we get a similar
+ ;; problem where the % and # chars appear as first chars of the 2-char
+ ;; comend, so the multi-line ender is also turned into style-b.
+ ;; Really, we can't make it work without extending the syntax-tables, or
+ ;; via font-lock-syntactic-keywords.
(modify-syntax-entry ?\% "< 13" table)
(modify-syntax-entry ?\# "< 13" table)
(modify-syntax-entry ?\{ "(} 2b" table)
- (modify-syntax-entry ?\} "){ 4" table)
+ (modify-syntax-entry ?\} "){ 4b" table)
(modify-syntax-entry ?\n ">" table)
table)
"Syntax table in use in `octave-mode' buffers.")
(beginning-of-line)
(point)))
(cfc (current-fill-column))
- (ind (calculate-octave-indent))
+ (ind (octave-indent-calculate))
comment-prefix)
(save-restriction
(goto-char beg)
(defun octave-completion-at-point-function ()
"Find the text to complete and the corresponding table."
- (let ((beg (save-excursion (backward-sexp 1) (point)))
- (end (if (< beg (point))
- (save-excursion (goto-char beg) (forward-sexp 1) (point))
- (point))))
+ (let* ((beg (save-excursion (backward-sexp 1) (point)))
+ (end (if (< beg (point))
+ (save-excursion (goto-char beg) (forward-sexp 1) (point))
+ (point))))
(list beg end octave-completion-alist)))
(defun octave-complete-symbol ()