summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorKarl Fogel <kfogel@red-bean.com>2008-01-20 00:19:04 -0500
committerLuke Kanies <luke@madstop.com>2008-03-20 11:45:56 -0500
commite00065a8e63a7222eacbc7e8aaa925e967fd5c60 (patch)
treedb95d215b3f873246af304e55a416478461e7909 /ext
parent5f3ed8d407ae4280dc7bd81569c48dc75cbc64e3 (diff)
downloadpuppet-e00065a8e63a7222eacbc7e8aaa925e967fd5c60.tar.gz
puppet-e00065a8e63a7222eacbc7e8aaa925e967fd5c60.tar.xz
puppet-e00065a8e63a7222eacbc7e8aaa925e967fd5c60.zip
* puppet/ext/emacs/puppet-mode.el (puppet-indent-line): Clean up the code somewhat after commit 738d275f41f3eaf015800021dd2dfe6c42a1ae79, as promised.
Diffstat (limited to 'ext')
-rw-r--r--ext/emacs/puppet-mode.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/emacs/puppet-mode.el b/ext/emacs/puppet-mode.el
index 54f9a71a6..f331474a9 100644
--- a/ext/emacs/puppet-mode.el
+++ b/ext/emacs/puppet-mode.el
@@ -174,20 +174,20 @@ that array, else return nil."
(while not-indented
(forward-line -1)
(cond
- ((bobp)
- (if (and (not (puppet-comment-line-p)) (looking-at "^.*{"))
- (setq cur-indent 2)
- (setq cur-indent 0))
- (setq not-indented nil))
((puppet-comment-line-p)
- ;; ignore it and continue iterating backwards
- )
+ (if (bobp)
+ (setq not-indented nil)
+ ;; else ignore the line and continue iterating backwards
+ ))
((looking-at "^.*}") ; indent at the level of the END_ token
(setq cur-indent (current-indentation))
(setq not-indented nil))
((looking-at "^.*{") ; indent an extra level
(setq cur-indent (+ (current-indentation) 2))
- (setq not-indented nil)))))))
+ (setq not-indented nil))
+ ((bobp)
+ (setq not-indented nil))
+ )))))
(if cur-indent
(indent-line-to cur-indent)
(indent-line-to 0)))))