Turning off syntactic indentation in emacs d-mode

wolframw wolframw at protonmail.com
Sat May 2 15:35:37 UTC 2020


On Thursday, 2 April 2020 at 19:48:48 UTC, Farhan Wali wrote:
> Hi,
>
> So d-mode on emacs seems to have strange indentation issues, 
> some of which seems to be documented here 
> https://github.com/Emacs-D-Mode-Maintainers/Emacs-D-Mode/issues/19
>
> This is almost a non-issue if you turn off 
> syntactic-indentation in the D menu bar. How can I set this to 
> be off by default? At the moment I have to keep turning it off 
> for every frame/buffer it seems.
>
> Cheers,
> Farhan

If you still have this issue, you could try adding the following 
hook to your Emacs init file:

(add-hook 'd-mode-hook
           (function (lambda ()
                       (setq c-syntactic-indentation nil))))

This seems to do the trick for me (although, obviously, some 
automatic indentation features no longer work, such as 
indentation of the first line after an '{' and de-indentation of 
'}').


More information about the Digitalmars-d-ide mailing list