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

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

[Ada-mode-users] comment-indent doesn't work as expected; problem with w


From: SCHOEPFLIN Markus
Subject: [Ada-mode-users] comment-indent doesn't work as expected; problem with wisi-comment-indent?
Date: Wed, 2 Nov 2016 11:28:48 +0000

Comment-indent is documented as:

  (comment-indent &optional CONTINUE)
  
  Indent this line's comment to `comment-column', or insert an empty comment.
  If CONTINUE is non-nil, use the `comment-continue' markers if any.

If I understand the implementation in 'newcomment.el' correctly, it basically 
forwards to 'wisi-comment-indent' when Ada mode is active and it is invoked in 
a line having some code and a comment. But 'wisi-comment-indent' does not seem 
to respect the setting for comment-column.

So, for example:

  X : Integer; -- some comment

When I position the cursor anywhere on that line and invoke comment-indent, I'd 
expect the comment to be indented to 'comment-column', which is 55 in my case. 
What happens is that the cursor is positioned at the comment start, on the 
first letter after "-- ", but nothing else.

Is this indeed a problem with 'wisi-comment-indent'?

Moreover, when I insert spaces between the code and the comment, so that the 
comment starts *after* column 63, and then invoke comment-indent, the comment 
gets positioned on column 63. I have no idea where that magic number comes from.

Markus



reply via email to

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