GNU bug report logs -
#78592
30.1; sh-mode variable sh-indent-comment does not work
Previous Next
Full log
Message #11 received at 78592 <at> debbugs.gnu.org (full text, mbox):
>> sh-mode variable sh-indent-comment does not work any more. Setting it to
>> nil or a number does not seem to
>> have any effect when indenting a comment in a shell script.
>>
>> Looking at sh-script.el it only seems to be referenced in sh-var-list
>> The same also seems to apply to the sh-mode variables
>> sh-first-lines-indent
>> sh-indent-for-else
Indeed, these vars were not ported over to the new SMIE-based indentation code.
>> Should it be marked as obsolete (or deleted)? Should it be removed from sh-var-list
I think so, yes.
> Stefan, this seems to be due to your cleanup of sh-script's
> indentation in
>
> commit f9504ffba2e2604338c243dd77c877bbb8162e4a
> Author: Stefan Monnier <monnier <at> iro.umontreal.ca>
> AuthorDate: Mon Feb 3 15:26:59 2020 -0500
> Commit: Stefan Monnier <monnier <at> iro.umontreal.ca>
> CommitDate: Mon Feb 3 15:26:59 2020 -0500
>
> * lisp/progmodes/sh-script.el: Remove old non-SMIE indentation code
>
> Are these variables really no-ops now?
Yes.
> I don't see that in NEWS in any release of Emacs except this in
> NEWS.28:
They were already no-ops when using SMIE indentation before that change,
so in a sense it is implied by "The old non-SMIE indentation of
'sh-mode' has been removed", but we should have removed those vars at
the same time.
I just hadn't noticed that nobody complained about the lack of support
for those vars, so the new code was never adjusted to obey them.
> ** The old non-SMIE indentation of 'sh-mode' has been removed.
>
> What, if anything, can users do now to control indentation of comment
> lines in sh-mode?
There's no easy/convenient way to do it.
They have to add a new function on `smie-indent-function` that provides
the indentation they want (or advise `smie-indent-comment`, or replace
this function on that list with another one).
Stefan
This bug report was last modified 18 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.