all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to disable auto-indent for a specific mode?
@ 2021-09-18  7:32 Pankaj Jangid
  2021-09-18 14:34 ` Óscar Fuentes
  0 siblings, 1 reply; 3+ messages in thread
From: Pankaj Jangid @ 2021-09-18  7:32 UTC (permalink / raw)
  To: Emacs Help

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?

-- 
Regards ~Pankaj



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to disable auto-indent for a specific mode?
  2021-09-18  7:32 How to disable auto-indent for a specific mode? Pankaj Jangid
@ 2021-09-18 14:34 ` Óscar Fuentes
  2021-09-19  2:35   ` Pankaj Jangid
  0 siblings, 1 reply; 3+ messages in thread
From: Óscar Fuentes @ 2021-09-18 14:34 UTC (permalink / raw)
  To: help-gnu-emacs

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))))




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to disable auto-indent for a specific mode?
  2021-09-18 14:34 ` Óscar Fuentes
@ 2021-09-19  2:35   ` Pankaj Jangid
  0 siblings, 0 replies; 3+ messages in thread
From: Pankaj Jangid @ 2021-09-19  2:35 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: help-gnu-emacs

Óscar Fuentes <ofv@wanadoo.es> writes:

> 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))))

Thanks. This worked for me. I need to look a bit more into it. That I’ll
do. Thanks for pointing to the right direction.

Currently, TAB is following weird indentation rules. That I must fix.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-19  2:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-18  7:32 How to disable auto-indent for a specific mode? Pankaj Jangid
2021-09-18 14:34 ` Óscar Fuentes
2021-09-19  2:35   ` Pankaj Jangid

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.