diff options
| author | Stefan Monnier | 2010-08-12 14:46:24 +0200 |
|---|---|---|
| committer | Stefan Monnier | 2010-08-12 14:46:24 +0200 |
| commit | 7e82caa7c7cd4743a602d7de94fe05a2258f5c7c (patch) | |
| tree | 4d66190c12a3bab55f6ea9d5ca42fdd49a04076f /lisp | |
| parent | c82d5b11aa7281c167367e4f94322d06909380d8 (diff) | |
| download | emacs-7e82caa7c7cd4743a602d7de94fe05a2258f5c7c.tar.gz emacs-7e82caa7c7cd4743a602d7de94fe05a2258f5c7c.zip | |
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.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/progmodes/octave-mod.el | 26 |
2 files changed, 14 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cfd8cd9c5f6..018da138dde 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | (octave-uncomment-region, octave-comment-indent) | 11 | (octave-uncomment-region, octave-comment-indent) |
| 12 | (octave-indent-for-comment): Remove. | 12 | (octave-indent-for-comment): Remove. |
| 13 | (octave-indent-calculate): Rename from calculate-octave-indent. | 13 | (octave-indent-calculate): Rename from calculate-octave-indent. |
| 14 | (octave-indent-line): Update caller. | 14 | (octave-indent-line, octave-fill-paragraph): Update caller. |
| 15 | (octave-initialize-completions): No need to make an alist. | 15 | (octave-initialize-completions): No need to make an alist. |
| 16 | (octave-completion-at-point-function): New function. | 16 | (octave-completion-at-point-function): New function. |
| 17 | (octave-complete-symbol): Use it. | 17 | (octave-complete-symbol): Use it. |
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index 1a7b4f12249..e0f4a878a3e 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el | |||
| @@ -294,17 +294,17 @@ parenthetical grouping.") | |||
| 294 | (modify-syntax-entry ?\" "\"" table) | 294 | (modify-syntax-entry ?\" "\"" table) |
| 295 | (modify-syntax-entry ?. "w" table) | 295 | (modify-syntax-entry ?. "w" table) |
| 296 | (modify-syntax-entry ?_ "w" table) | 296 | (modify-syntax-entry ?_ "w" table) |
| 297 | ;; FIXME: The < property of # and % makes Emacs-23 ignore any subsequent | 297 | ;; FIXME: The "b" flag only applies to the second letter of the comstart |
| 298 | ;; char including {, so it never gets to see the multi-line comments. | 298 | ;; and the first letter of the comend, i.e. the "4b" below is ineffective. |
| 299 | ;; This is a shortcoming in syntax.c. In Twelf-mode (which also suffers | 299 | ;; If we try to put `b' on the single-line comments, we get a similar |
| 300 | ;; from this problem) we work around the issue by setting "% " rather than | 300 | ;; problem where the % and # chars appear as first chars of the 2-char |
| 301 | ;; just "%" as a comment-starter, but it seems this wouldn't cut it | 301 | ;; comend, so the multi-line ender is also turned into style-b. |
| 302 | ;; for Octave. | 302 | ;; Really, we can't make it work without extending the syntax-tables, or |
| 303 | ;; Hopefully we'll get to fix this in Emacs-24. | 303 | ;; via font-lock-syntactic-keywords. |
| 304 | (modify-syntax-entry ?\% "< 13" table) | 304 | (modify-syntax-entry ?\% "< 13" table) |
| 305 | (modify-syntax-entry ?\# "< 13" table) | 305 | (modify-syntax-entry ?\# "< 13" table) |
| 306 | (modify-syntax-entry ?\{ "(} 2b" table) | 306 | (modify-syntax-entry ?\{ "(} 2b" table) |
| 307 | (modify-syntax-entry ?\} "){ 4" table) | 307 | (modify-syntax-entry ?\} "){ 4b" table) |
| 308 | (modify-syntax-entry ?\n ">" table) | 308 | (modify-syntax-entry ?\n ">" table) |
| 309 | table) | 309 | table) |
| 310 | "Syntax table in use in `octave-mode' buffers.") | 310 | "Syntax table in use in `octave-mode' buffers.") |
| @@ -1118,7 +1118,7 @@ otherwise." | |||
| 1118 | (beginning-of-line) | 1118 | (beginning-of-line) |
| 1119 | (point))) | 1119 | (point))) |
| 1120 | (cfc (current-fill-column)) | 1120 | (cfc (current-fill-column)) |
| 1121 | (ind (calculate-octave-indent)) | 1121 | (ind (octave-indent-calculate)) |
| 1122 | comment-prefix) | 1122 | comment-prefix) |
| 1123 | (save-restriction | 1123 | (save-restriction |
| 1124 | (goto-char beg) | 1124 | (goto-char beg) |
| @@ -1195,10 +1195,10 @@ otherwise." | |||
| 1195 | 1195 | ||
| 1196 | (defun octave-completion-at-point-function () | 1196 | (defun octave-completion-at-point-function () |
| 1197 | "Find the text to complete and the corresponding table." | 1197 | "Find the text to complete and the corresponding table." |
| 1198 | (let ((beg (save-excursion (backward-sexp 1) (point))) | 1198 | (let* ((beg (save-excursion (backward-sexp 1) (point))) |
| 1199 | (end (if (< beg (point)) | 1199 | (end (if (< beg (point)) |
| 1200 | (save-excursion (goto-char beg) (forward-sexp 1) (point)) | 1200 | (save-excursion (goto-char beg) (forward-sexp 1) (point)) |
| 1201 | (point)))) | 1201 | (point)))) |
| 1202 | (list beg end octave-completion-alist))) | 1202 | (list beg end octave-completion-alist))) |
| 1203 | 1203 | ||
| 1204 | (defun octave-complete-symbol () | 1204 | (defun octave-complete-symbol () |