 
 (defun anything-gentoo-install (candidate)
   (funcall anything-gentoo-prefered-shell)
-  (insert (concat "sudo emerge -av " candidate)))
+  (if anything-c-marked-candidate-list
+      (let ((elms (mapconcat 'identity anything-c-marked-candidate-list " ")))
+        (insert (concat "sudo emerge -av " elms)))
+      (insert (concat "sudo emerge -av " candidate))))
 
 (defun anything-gentoo-uninstall (candidate)
   (funcall anything-gentoo-prefered-shell)
-  (insert (concat "sudo emerge -avC " candidate)))
+  (if anything-c-marked-candidate-list
+      (let ((elms (mapconcat 'identity anything-c-marked-candidate-list " ")))
+        (insert (concat "sudo emerge -avC " elms)))
+      (insert (concat "sudo emerge -avC " candidate))))
 
 (defun anything-c-gentoo-default-action (elm command &rest args)
   "Gentoo default action that use `anything-c-gentoo-buffer'."

                                     (font-lock-mode 1)))
               ("Run emerge pretend" . (lambda (elm)
                                         (anything-c-gentoo-eshell-action elm "emerge -p")))
               ("Emerge" . (lambda (elm)
                             (anything-gentoo-install elm)))
               ("Unmerge" . (lambda (elm)
                              (anything-gentoo-uninstall elm)))
               ("Show dependencies" . (lambda (elm)
                                        (anything-c-gentoo-default-action elm "equery" "-C" "d")))
               ("Show related files" . (lambda (elm)

     ("Ediff Marked buffers" . anything-ediff-marked-buffers)
     ("Ediff Merge marked buffers" . (lambda (candidate)
                                       (anything-ediff-marked-buffers candidate t))))
    (candidate-transformer anything-c-skip-current-buffer anything-c-skip-boring-buffers))
  "Buffer or buffer name.")

(define-anything-type-attribute 'file
