[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to disable auto-indent for a specific mode?
From: |
Óscar Fuentes |
Subject: |
Re: How to disable auto-indent for a specific mode? |
Date: |
Sat, 18 Sep 2021 16:34:41 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Pankaj Jangid <pankaj@codeisgreat.org> writes:
> I am using plantuml-mode for some UML diagrams. But I discovered that
> the auto-indent is broken. And the project doesn’t seem to be
> active. But to be honest, I haven’t yet contacted the maintainer of the
> package. I’ll definitely do.
>
> For the time being, I want to disable auto-indent for this particular
> mode? Is there a way to suppress that? Or is this something that is
> controlled by a mode specific variable?
A quick look at
https://github.com/skuro/plantuml-mode/blob/develop/plantuml-mode.el
shows that it is using its own indentation function, and it is not
customizable.
You can modify the source code or use a hook to set the local variable
indent-line-function to something else (untested):
(add-hook 'plantuml-mode-hook
(lambda ()
(setq indent-line-function (lambda () 'noindent))))