Bug #5401

puppet-mode.el indentation problems with if/else blocks

Added by micah - over 2 years ago. Updated over 2 years ago.

Status:AcceptedStart date:11/28/2010
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:ext
Target version:-
Affected Puppet version:2.6.0 Branch:
Keywords:emacs, mode, formatting

Description

The emacs puppet-mode.el works really well, however as the language has developed more functionality, the mode has not caught up with it.

One issue that I’ve noticed is as follows, if we have the following code:

  if $puppetmaster_checklastrun {
    include puppet::puppetmaster::checklastrun
  } else {
    include puppet::puppetmaster::checklastrun::disable
  }

The puppet-mode wants to indent this into the following:

  if $puppetmaster_checklastrun {
    include puppet::puppetmaster::checklastrun
    } else {
    include puppet::puppetmaster::checklastrun::disable
    }

and then any following code will be similarly be affected in a cascading way.

Note: I’ve assigned the Category to be ‘ext’ as this is where the puppet-mode.el used to reside, however this may not be the correct category (or perhaps a new category for these issues would be warranted), if so, please feel free to change it.

History

#1 Updated by James Turnbull over 2 years ago

  • Status changed from Unreviewed to Accepted

Also available in: Atom PDF