[PUP-3973] puppet-mode.el indentation problems with if/else blocks Created: 2015/02/06  Updated: 2019/04/04  Resolved: 2017/12/08

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: redmine.exporter Assignee: Unassigned
Resolution: Won't Do Votes: 1
Labels: help_wanted, redmine
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:

 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.



 Comments   
Comment by Henrik Lindberg [ 2015/02/06 ]

Need help from Emacs savvy engineers - PRs welcome.

Comment by Pär Lindfors [ 2017/12/07 ]

puppet-mode have been removed from puppet.git (PUP-7558) so this should probably be closed?

For the voxpupuli maintained puppet-mode, I have an open pull request that fixes this particular issue: https://github.com/voxpupuli/puppet-mode/pull/104

Generated at Thu Nov 21 02:45:53 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.