|
From: | Juri Linkov |
Subject: | Re: wdired-change-to-wdired-mode needs a key binding in dired-mode |
Date: | Sat, 28 Jul 2007 12:14:42 +0300 |
User-agent: | Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
>> Since wdired doesn't work in modes that inherit from dired-mode, >> it would be useful to leave the original binding to toggle-read-only >> in them: > > Rather than "fix" each derived mode one by one, how 'bout doing > > (define-key dired-mode-map "\C-x\C-q" > '(menu-item nil wdired-change-to-wdired-mode > :filter (lambda (x) (if (eq major-mode 'dired-mode) x)))) > > Or maybe more simply create a new function dired-toggle-read-only which > either calls wdired-change-to-wdired-mode or toggle-read-only depending on > whether wdired makes sense or not (by testing (eq major-mode 'dired-mode) or > whatever else). I prefer a new function. That's what I already thought about after seeing that Dan mentioned vc-dired. -- Juri Linkov http://www.jurta.org/emacs/
[Prev in Thread] | Current Thread | [Next in Thread] |