The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #5401

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

Added by micah - over 5 years ago. Updated about 1 year ago.

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


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

We've Moved!

Ticket tracking is now hosted in JIRA:

This ticket is now tracked at:


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.


#1 Updated by James Turnbull over 5 years ago

  • Status changed from Unreviewed to Accepted

#2 Updated by Andreas Fuchs about 1 year ago

Redmine Issue #5401 has been migrated to JIRA:

Also available in: Atom PDF