ada-mode-users
[Top][All Lists]
Advanced

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

Re: Ada mode 6.2.1: ada-indent-comment-col-0 no longer honored


From: Stephen Leake
Subject: Re: Ada mode 6.2.1: ada-indent-comment-col-0 no longer honored
Date: Mon, 18 Nov 2019 09:48:26 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt)

SCHOEPFLIN Markus <address@hidden> writes:

> In my .emacs I have " '(ada-indent-comment-col-0 t)",

I gather this is part of a "custom-set-variables" form.

ada-indent-comment-col-0 is buffer-local; does custom-set-variables
handle that properly? (I tried reading the code in custom.el, and it's
complicated; it seems to use set-default unless special conditions
apply) It may be setting the value for the .emacs buffer only, or
possibly only for the first ada-mode buffer created.

Try this instead in your .emacs:

    (set-default 'ada-indent-comment-col-0 t)

Also examine the value in the ada-mode buffer (M-x
ada-indent-comment-col-0); is it t?

If that fixes the problem, then I should change all the buffer-local
indent settings to be not custom variables. Keeping them custom makes
them easier to discover.

If that doesn't fix the problem, something else is wrong.

You can look in the " *Ada_wisi_parse*" buffer (note the leading space
in the name); the first line is the parse command sent to the background
process, with lots of parameters for the indent settings. One of the
values is either 0 or 1 for ada-indent-comment-col-0 nil or t. The line
looks like either:

;; parse 2 "ada_mode-options.ads" 1 918 918 1 1 33 0 0 0 -1 0 0 0 -1 -1 -1 15 
917 3 2 0 0 -3 0 2 0 2 3 2 0 0
;; parse 2 "ada_mode-options.ads" 1 918 918 1 1 33 0 0 0 -1 0 0 0 -1 -1 -1 15 
917 3 2 1 0 -3 0 2 0 2 3 2 0 0

   ada-indent-comment-col-0 
----------------------------------------------------------^

(those lines will probably get messed up by the mail program).

Here the first line has nil, the second t. That should reflect the value
in the buffer. (this line is built in the function
wisi-process-parse--send-parse, which calls
wisi-parse-format-language-options, which handles
ada-indent-comment-col-0).

If that is correct, you've found a corner case in the indent algorithm;
please post a reproducing source file.

--
-- Stephe



reply via email to

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