     (setq compilation-error-list nil)
     (let (buffer-of-error)
       (while (not (eobp))
-	(cond
-	 ((looking-at "^dot\\( -[^ ]+\\)* \\(.*\\)")
-	  (setq buffer-of-error (find-file-noselect
-				 (buffer-substring-no-properties
-				  (nth 4 (match-data t))
-				  (nth 5 (match-data t))))))
-	 ((looking-at ".*:.*line \\([0-9]+\\)")
-	  (let ((line-of-error
-		 (string-to-number (buffer-substring-no-properties
-				    (nth 2 (match-data t))
-				    (nth 3 (match-data t))))))
-	    (setq compilation-error-list
-		  (cons
-		   (cons
-		    (point-marker)
-		    (save-excursion
-		      (set-buffer buffer-of-error)
-		      (goto-line line-of-error)
-		      (beginning-of-line)
-		      (point-marker)))
-		   compilation-error-list))))
-	  (t t))
-	(forward-line 1)) )))
-
+  (cond
+   ((looking-at "^dot\\( -[^ ]+\\)* \\(.*\\)")
+    (setq buffer-of-error (find-file-noselect
+         (buffer-substring-no-properties
+          (nth 4 (match-data t))
+          (nth 5 (match-data t))))))
+   ((looking-at ".*:.*line \\([0-9]+\\)")
+    (let ((line-of-error
+     (string-to-number (buffer-substring-no-properties
+            (nth 2 (match-data t))
+            (nth 3 (match-data t))))))
+      (setq compilation-error-list
+      (cons
+       (cons
+        (point-marker)
+        (save-excursion
+          (set-buffer buffer-of-error)
+          (goto-line line-of-error)
+          (beginning-of-line)
+          (point-marker)))
+       compilation-error-list))))
+    (t t))
+  (forward-line 1)) )))
+
+;;;;
 ;;;; Indentation
+;;;;
+(defun graphviz-dot-uncomment-region (begin end)
+	"Uncomments a region of code."
+	(interactive "r")
+	(comment-region begin end '(4)))
+
 (defun graphviz-dot-indent-line ()
   "Indent current line of dot code."
   (interactive)
+  (if (bolp)
+      (graphviz-dot-real-indent-line)
+    (save-excursion
+      (graphviz-dot-real-indent-line))))
+        
+(defun graphviz-dot-real-indent-line ()
+  "Indent current line of dot code."
   (beginning-of-line)
   (cond
    ((bobp)

;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
;; MA 02111-1307 USA

;; Author: Pieter E.J. Pareit <pieter.pareit@planetinternet.be>
;; Maintainer: Pieter E.J. Pareit <pieter.pareit@planetinternet.be>
;; Created: 28 Oct 2002
;; Version: 0.2
;; Keywords: mode dot dot-language dotlanguage graphviz graphs att

;;; Commentary:
;; Use this mode for editing files in the dot-language (www.graphviz.org and
;; http://www.research.att.com/sw/tools/graphviz/).
;; To use graphviz-dot-mode, add (load-file "PATH_TO_FILE/graphviz-dot-mode.el") to your .emacs.
;; The graphviz-dot-mode will do font locking, indentation and handles insertion of
;; comments.
;; Font locking is automatic, indentation uses the same commands as other
;; modes, tab, M-j and C-M-q.  Insertion of comments uses the same commands as other
;; modes, M-; .
;; You can compile a file using M-x compile or C-c c, after that M-x next-error will
;; also work.
;; There is support for viewing an generated image with C-c p.

;;; History:
;; Version 0.2 added features
;; 11/11/2002: added preview support.
;; 10/11/2002: indent a graph or subgraph at once with C-M-q.

;;; graphviz-dot-mode.el --- Mode for the dot-language used by graphviz (att).

;; Copyright (C) 2002 - 2005 Pieter Pareit <pieter.pareit@scarlet.be>

;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
