     (kotct/packup-initialize-buffer)
     (if (= (point-min) (point-max))
         (progn
-         (kill-buffer buffer)
-         (message "Nothing to update!"))
+          (kill-buffer buffer)
+          (message "Nothing to update!"))
       (pop-to-buffer-same-window buffer))))
 
 ;;;###autoload

  (package-refresh-contents)
  (let ((install-list nil))
    (dolist (package kotct/dependency-list)
      (if (or (not (package-installed-p package))
              (not (kotct/package-up-to-date-p package)))
          (apply 'kotct/packup-insert-package-row (list package (package-desc-version (cadr (assq package package-alist)))))))))

(defun kotct/packup-initialize-buffer ()
  "Initializes the packup buffer."
  (kill-all-local-variables)
  (use-local-map packup-mode-map)
  (setq major-mode 'packup-mode
        mode-name "Packup"
        buffer-read-only t)
  (kotct/packup-initialize-buffer-contents))


(defmacro kotct/packup-map-over-marks (body)
  "Call BODY on each marked line in current buffer."
  `(let ((inhibit-read-only t)
         (regexp (kotct/packup-marker-regexp))
         case-fold-search next-position results)
     (save-excursion
       (goto-char (point-min))
       ;; remember position of next marked package before BODY
       ;; can insert lines before the just found package,
       ;; confusing us by finding the same marked package again
       ;; and again and...
       (setf next-position (and (re-search-forward regexp nil t)
                                (point-marker)))
       (while next-position
         (goto-char next-position)
         (setf results (cons ,body results))
         ;; move after last match
         (goto-char next-position)
         (forward-line 1)
         (set-marker next-position nil)
         (setf next-position (and (re-search-forward regexp nil t)
                                  (point-marker)))))
     results))

(defun kotct/packup-get-package-name ()
  "Gets package name on current line.
Returns \"\" if there is no package name on the line."
  (save-excursion
    (beginning-of-line)
    (forward-char 4)
    (let ((point (point-marker)))
      (if (re-search-forward " " nil t)
          (progn
            (backward-char)
            (buffer-substring point (point-marker)))
        ""))))

(defun kotct/packup-do-update ()
  "Executes update in current buffer."
