     (pop-to-buffer-same-window buffer)))
 
 ;;;###autoload
-(defun kotct/packup-install-dependencies (no-refresh &optional update)
+(defun kotct/packup-install-dependencies (no-refresh &optional update auto-update)
   "Installs the dependencies.
 With a non-nil or prefix arg NO-REFRESH, do not refresh package list.
-If UPDATE is non-nil, out-of-date packages will be updated."
+If UPDATE is non-nil, out-of-date packages will be added to install list.
+If AUTO-UPDATE is non-nil, out-of-date/uninstalled packages will be updated."
   (interactive "P")
 
   (unless no-refresh (package-refresh-contents))

  (let ((kotct/packup-marker-char ?\040))
    (kotct/packup-mark arg interactive)))

;; TODO (un)mark all

(defun kotct/packup-initialize-buffer ()
  "Initializes the packup buffer."

        mode-name "Packup"
        buffer-read-only t ;; read only
        mode-line-buffer-identification "packup")
  (kotct/packup-initialize-buffer-contents)
)

(defun kotct/packup-refresh ()
  "Refreshes packages in current buffer."
  (interactive)
  (if (eq major-mode 'packup-mode)
    (let ((inhibit-read-only t))
      (erase-buffer)
      (kotct/packup-initialize-buffer-contents))))

(defvar packup-mode-map
  (let ((map (make-keymap)))
    (define-key map "m" 'kotct/packup-mark)
    (define-key map "u" 'kotct/packup-unmark)
    (define-key map "x" 'kotct/packup-do-update)
    (define-key map "g" 'kotct/packup-refresh)
    map))

;;;###autoload
