Subject: bug#8615: Please make sure v q removes the buffer for JPGs just like it does for other files

From: Juri Linkov <[email-masked]>
Date: Thu, 08 Dec 2011 11:01:04 +0200

> I only want viewing of images, and OK maybe directories too to disappear
> from the buffer list upon 'q'. The rest is overkill. I like the
> *compilation* buffer etc. to stay around even if no running process. Help.

Then bind them separately:

(eval-after-load "image-mode"
  '(progn
     (define-key image-mode-map "q"
       (lambda () (interactive) (quit-window (not current-prefix-arg))))))

(eval-after-load "dired"
  '(progn
     (define-key dired-mode-map "q"
       (lambda () (interactive) (quit-window (not current-prefix-arg))))))