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, 15 Dec 2011 23:30:55 +0200

> (eval-after-load "compile"
>   '(progn
>      (define-key compilation-mode-map ... ???
>
> I tired several things but nothing worked. Perhaps the "remap" above
> ruined it for everything.

You could try:

(define-key special-mode-map "q"
  (lambda () (interactive) (quit-window (not current-prefix-arg))))

(eval-after-load "compile"
  '(progn
     (define-key compilation-mode-map "q" 'quit-window)))

PS:
This means that in 24.2 we should add two customizable options:
one with a list of modes to remap, and one with a list of modes
to exclude from remapping.