Stephen Leake <[email protected]> writes:
> Simon Wright <[email protected]> writes:
>
>> A subset of this was posted on c.l.a recently,
>
> You've probably noticed I don't follow that group any more.
>
>>
>> TAB on all the lines except line 3 is good, but the error with TAB on line 3
>> is
>>
>> Error: (error "cl-ecase failed: derived_type_definition, (aggregate
>> aspect_specification_opt)")
>> save-excursion: Wrong type argument: number-or-marker-p, nil
>>
>> If I toggle-debug-on-error, point is on the w of 'with' on line 2.
>> The calling sequence (last call first) is
>>
>> ada-wisi-after-cache()
>> ada-wisi-comment()
>> wisi-indent-line()
>> indent-for-tab-command(nil)
>>
>> Might this be related to the two _opt's in derived_type_definition in
>> ada-grammar.wy?
>
> No, a "cl-ecase" error means there is a missing case (and associated
> test) in ada-wisi-after-cache.
Here's a patch:
#
# old_revision [f24ef4f6528fdd51e6d0be800a03fa569bc42b1a]
#
# patch "ada-wisi.el"
# from [616e9885e07e02dbe0a7502a54a792e149ba98ed]
# to [99a6a34610e4f808a6aeafcec926e6c699d31782]
#
============================================================
--- ada-wisi.el 616e9885e07e02dbe0a7502a54a792e149ba98ed
+++ ada-wisi.el 99a6a34610e4f808a6aeafcec926e6c699d31782
@@ -1236,6 +1236,14 @@ cached token, return new indentation for
;; Constant_Indexing => Constant_Reference,
;; indenting 'Constant_Indexing'; point is on 'with'
(+ (current-indentation) ada-indent-broken))
+
+ (derived_type_definition
+ ;; test/ada_mode-nominal-child.ads
+ ;; type Child_Type_1 is new Parent_Type_1 with
+ ;; -- comment between 'with' and 'record'
+ ;; record
+ ;; indenting comment
+ (+ (current-indentation) ada-indent-broken))
))
;; otherwise just hanging
That puts the comment in a place that GNAT will probably complain about:
type A is new B with
-- a comment; TAB on this line results in error
record
But (setq ada-indent-comment-gnat t) fixes that:
type A is new B with
-- a comment; TAB on this line results in error
record
--
-- Stephe
_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org