2 clarify what we're talking about, and what's actually wrong with what emacs does
source | link

emacs - customize language file Customize Emacs Ruby Mode for PuppetLabs conifguration

I predominantly use emacs for editing my Puppet configuration filesPuppet configuration files. I use the following settings in my .emacs to load Ruby mode and use it for Puppet config files (*.pp):

(setq backup-directory-alist
      `((".*" . ,"~/.emacs-bak")))
(setq auto-save-file-name-transforms
      `((".*" ,"~/.emacs-bak" t)))
(autoload 'ruby-mode "ruby-mode" "Major mode for editing ruby scripts." t)
(setq auto-mode-alist  (cons '(".rb$" . ruby-mode) auto-mode-alist))
(setq auto-mode-alist  (cons '(".pp$" . ruby-mode) auto-mode-alist))

This works well except for the the indentation of the 'ensure' directive in my puppet files. Because ensure is a reserved word in Ruby, it outdents it:

cron { logrotate:
  command => "/usr/sbin/logrotate",
  user => root,
  hour => 2,
ensure => present
  minute => 0,
}

How do I change this behaviortell Emacs to not treat ensure specially in Puppet files?

emacs - customize language file

I predominantly use emacs for editing my Puppet configuration files. I use the following settings in my .emacs:

(setq backup-directory-alist
      `((".*" . ,"~/.emacs-bak")))
(setq auto-save-file-name-transforms
      `((".*" ,"~/.emacs-bak" t)))
(autoload 'ruby-mode "ruby-mode" "Major mode for editing ruby scripts." t)
(setq auto-mode-alist  (cons '(".rb$" . ruby-mode) auto-mode-alist))
(setq auto-mode-alist  (cons '(".pp$" . ruby-mode) auto-mode-alist))

This works well except for the the indentation of the 'ensure' directive in my puppet files. How do I change this behavior?

Customize Emacs Ruby Mode for PuppetLabs conifguration

I predominantly use emacs for editing my Puppet configuration files. I use the following settings in my .emacs to load Ruby mode and use it for Puppet config files (*.pp):

(autoload 'ruby-mode "ruby-mode" "Major mode for editing ruby scripts." t)
(setq auto-mode-alist  (cons '(".rb$" . ruby-mode) auto-mode-alist))
(setq auto-mode-alist  (cons '(".pp$" . ruby-mode) auto-mode-alist))

This works well except for the the indentation of the 'ensure' directive in my puppet files. Because ensure is a reserved word in Ruby, it outdents it:

cron { logrotate:
  command => "/usr/sbin/logrotate",
  user => root,
  hour => 2,
ensure => present
  minute => 0,
}

How do I tell Emacs to not treat ensure specially in Puppet files?

1
source | link

emacs - customize language file

I predominantly use emacs for editing my Puppet configuration files. I use the following settings in my .emacs:

(setq backup-directory-alist
      `((".*" . ,"~/.emacs-bak")))
(setq auto-save-file-name-transforms
      `((".*" ,"~/.emacs-bak" t)))
(autoload 'ruby-mode "ruby-mode" "Major mode for editing ruby scripts." t)
(setq auto-mode-alist  (cons '(".rb$" . ruby-mode) auto-mode-alist))
(setq auto-mode-alist  (cons '(".pp$" . ruby-mode) auto-mode-alist))

This works well except for the the indentation of the 'ensure' directive in my puppet files. How do I change this behavior?