Search code examples
perlemacscperl-mode

How do I stop auto-formatting in emacs cperl mode?


When I do indent-region in cperl-mode

if ($x) { next; }

Emacs reformats it to:

if ($x) {
  next;
}

How can I make it stop doing that?

Note: the question originally said that this reformatting happens when yanking. I have yank setup to indent-region as well.


Solution

  • (setq cperl-break-one-line-blocks-when-indent nil)