- (setq indent 0)
-
- (if (nagios-in-block)
- (setq indent nagios-indent-level))
-
- (setq pos (point))
- (end-of-line)
- (setq eol (point))
- (beginning-of-line)
- (setq bol (point))
-
- ;; Set the indentation level to 0 if we find either brace on this
- ;; line.
- (if (re-search-forward "[{}]" eol t)
- (setq indent 0))
-
- (goto-char pos)
-
- indent
+ ;; We're either inside a block, or we aren't.
+ ;; Initialize the indent variable to either nagios-indent-level
+ ;; or 0 depending on whether or not we're in a block.
+ (let ((indent (if (nagios-in-block)
+ nagios-indent-level
+ 0)
+ )
+ )
+
+ ;; Set the indentation level to 0 if we find either brace on this
+ ;; line and.
+ (if (and (nagios-brace-on-line)
+ (not (nagios-char-is-commented (nagios-brace-on-line))))
+ 0
+ indent
+ )