unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Juri Linkov <juri@jurta.org>
Cc: dann@ics.uci.edu, Thien-Thi Nguyen <ttn@gnuvola.org>,
	emacs-devel@gnu.org
Subject: Re: wdired-change-to-wdired-mode needs a key binding in dired-mode
Date: Fri, 27 Jul 2007 23:53:41 -0400	[thread overview]
Message-ID: <jwvd4ydfars.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87y7h15zrk.fsf@jurta.org> (Juri Linkov's message of "Fri\, 27 Jul 2007 23\:59\:27 +0300")

> 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).


        Stefan

  parent reply	other threads:[~2007-07-28  3:53 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-24  2:16 wdired-change-to-wdired-mode needs a key binding in dired-mode Dan Nicolaescu
2007-07-24  5:31 ` Mathias Dahl
2007-07-24  6:19   ` Thien-Thi Nguyen
2007-07-24  8:46     ` joakim
2007-07-24  9:55     ` Mathias Dahl
2007-07-24 22:17     ` Richard Stallman
2007-07-24 23:06       ` Dan Nicolaescu
2007-07-25 20:11         ` Richard Stallman
2007-07-26  2:12           ` Dan Nicolaescu
2007-07-26 16:59             ` Richard Stallman
2007-07-25 20:57         ` Juri Linkov
2007-07-26  0:44           ` Stefan Monnier
2007-07-26  2:09             ` Dan Nicolaescu
2007-07-26  8:54               ` Juri Linkov
2007-07-26 16:59               ` Richard Stallman
2007-07-27 20:59                 ` Juri Linkov
2007-07-29  2:22                   ` Richard Stallman
2007-07-29  9:19                     ` Juri Linkov
2007-07-29 22:02                       ` Dan Nicolaescu
2007-07-30 20:47                         ` Richard Stallman
2007-07-27 20:59     ` Juri Linkov
2007-07-27 21:50       ` Dan Nicolaescu
2007-07-27 22:02         ` Leo
2007-07-28  3:53       ` Stefan Monnier [this message]
2007-07-28  9:14         ` Juri Linkov
2007-07-29  2:22       ` Richard Stallman
2007-07-29  9:20         ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvd4ydfars.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    --cc=juri@jurta.org \
    --cc=ttn@gnuvola.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).