Fix last change.

* lisp/progmodes/octave-mod.el (octave-mode-syntax-table):
Better describe the problem.
(octave-fill-paragraph): Also update caller.
(octave-completion-at-point-function): Fix up typo.
This commit is contained in:
Stefan Monnier 2010-08-12 14:46:24 +02:00
parent c82d5b11aa
commit 7e82caa7c7
2 changed files with 14 additions and 14 deletions

View file

@ -11,7 +11,7 @@
(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.

View file

@ -294,17 +294,17 @@ parenthetical grouping.")
(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.")
@ -1118,7 +1118,7 @@ otherwise."
(beginning-of-line)
(point)))
(cfc (current-fill-column))
(ind (calculate-octave-indent))
(ind (octave-indent-calculate))
comment-prefix)
(save-restriction
(goto-char beg)
@ -1195,10 +1195,10 @@ otherwise."
(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 ()