GNU bug report logs -
#8615
Please make sure v q removes the buffer for JPGs just like it does for other files
Previous Next
Reported by: jidanni <at> jidanni.org
Date: Wed, 4 May 2011 18:18:01 UTC
Severity: minor
Tags: fixed
Merged with 6954
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 12/10/11 3:17 AM, jidanni <at> jidanni.org wrote:
> Erg... this is what I have so far,
>
> (eval-after-load "image-mode"
> '(progn
> (define-key image-mode-map "q"
> (lambda () (interactive) (quit-window (not current-prefix-arg))))));bug#8615
> (eval-after-load "dired"
> '(progn
> (define-key dired-mode-map "q"
> (lambda () (interactive) (quit-window (not current-prefix-arg))))))
> (eval-after-load "arc-mode"
> '(progn
> (define-key archive-mode-map "q";note the difference from the library name
> (lambda () (interactive) (quit-window (not current-prefix-arg))))))
>
> i.e., an ever growing list. OK, I give up, you win. I'll use
>
> (global-set-key [remap quit-window]
> (lambda () (interactive) (quit-window (not current-prefix-arg))))
>
> But please tell me how to then restore the virgin "q" behavior for one or two
> modes, e.g.,
>
> (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.
Just a guess, assuming that the original behavior is (quit-window
current-prefix-arg):
(defvar remap-quit-window-exceptions '()
"List of `major-mode' symbols in which `quit-window' should not be remapped.")
(global-set-key [remap quit-window]
(lambda () (interactive)
(if (memq major-mode remap-quit-window-exceptions)
(quit-window current-prefix-arg)
(quit-window (not current-prefix-arg)))))
;; (setq remap-quit-window-exceptions
;; (cons 'compilation-mode remap-quit-window-exceptions))
--
Kevin Rodgers
Denver, Colorado, USA
This bug report was last modified 13 years and 243 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.