emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101057: Fix last change.


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101057: Fix last change.
Date: Thu, 12 Aug 2010 14:46:24 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101057
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Thu 2010-08-12 14:46:24 +0200
message:
  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.
modified:
  lisp/ChangeLog
  lisp/progmodes/octave-mod.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-08-12 11:22:16 +0000
+++ b/lisp/ChangeLog    2010-08-12 12:46:24 +0000
@@ -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.

=== modified file 'lisp/progmodes/octave-mod.el'
--- a/lisp/progmodes/octave-mod.el      2010-08-12 11:22:16 +0000
+++ b/lisp/progmodes/octave-mod.el      2010-08-12 12:46:24 +0000
@@ -294,17 +294,17 @@
     (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 @@
                (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 @@
 
 (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 ()


reply via email to

[Prev in Thread] Current Thread [Next in Thread]