[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



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.

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 Fri Aug 07 09:07:28 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.