The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

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 https://tickets.puppetlabs.com. 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:

0%

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

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket is now tracked at: https://tickets.puppetlabs.com/browse/PUP-3973


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

https://tickets.puppetlabs.com/browse/PUP-3973

Also available in: Atom PDF