Stephen Leake <[email protected]> writes:

> Simon Wright <[email protected]> writes:
>
>> Just noticed this one ..
>>
>> package Enum_Rep is
>>    type Leds is (Led3, Led4) with
>>      Convention => C;
>>    for Leds use (Led3 => 2#0000#,
>>                    Led4 => 2#0001#);  -- should align with Led3 above
>> end Enum_Rep;
>
> This is due to a bug in wisi-backward-token; the '#' gets lumped with
> the ',' (both have punctuation syntax class), which doesn't happen in
> wisi-forward-token, so things get confused. Working on a fix.

Fixed this:

============================================================
--- wisi.el
+++ wisi.el
@@ -326,6 +327,24 @@ wisi-forward-token, but does not look up
     (cond
      ((bobp) nil)
 
+     ((eq syntax 1)
+      ;; punctuation. Find the longest matching string in 
wisi-punctuation-table
+      (backward-char 1)
+      (let ((next-point (point))
+           temp-text done)
+       (while (not done)
+         (setq temp-text (buffer-substring-no-properties (point) end))
+         (when (car (rassoc temp-text wisi-punctuation-table))
+           (setq next-point (point)))
+         (if (or
+              (bobp)
+              (= (- end (point)) wisi-punctuation-table-max-length))
+             (setq done t)
+           (backward-char 1))
+         )
+       (goto-char next-point))
+      )
+
      ((memq syntax '(4 5)) ;; open, close parenthesis
       (backward-char 1))
 

-- 
-- Stephe

_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org

Reply via email to