all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: PCL-CVS: M-x cvs-update vs. key binding in *cvs* buffer
Date: Wed, 22 Aug 2007 22:07:59 +0200	[thread overview]
Message-ID: <v9tzqruycg.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <jwvr6lwncdz.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 21 Aug 2007 11:22:16 -0400")

On Tue, Aug 21 2007, Stefan Monnier wrote:

>> It seems that `cvs-query-directory' tries to figure out if it was
>> called via M-x.  But I don't quite understand the purpose.
>
> I can't remember the original reason.  It may have been to preserve the
> original behavior which was to always prompt for a directory.
> But since C-u does the job as well we don't need that kind of hack.
> Feel free to remove it,

Like this (maybe someone could suggest a nicer doc string)?
Should it go to go to Emacs 22.2 as well?

--8<---------------cut here---------------start------------->8---
(defun cvs-query-directory (prompt)
  "Read directory name, prompting with PROMPT.
If in a *cvs* buffer, don't prompt unless a prefix argument is given."
  (if (and (cvs-buffer-p)
	   (not current-prefix-arg))
      default-directory
    (read-directory-name prompt nil default-directory nil)))
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
--- pcvs.el	12 Aug 2007 18:07:07 -0000	1.98.2.7
+++ pcvs.el	22 Aug 2007 20:01:16 -0000
@@ -981,13 +981,13 @@
   (interactive)
   (cvs-examine default-directory t))
 
-(defun cvs-query-directory (msg)
-  ;; last-command-char = ?\r hints that the command was run via M-x
+(defun cvs-query-directory (prompt)
+  "Read directory name, prompting with PROMPT.
+If in a *cvs* buffer, don't prompt unless a prefix argument is given."
   (if (and (cvs-buffer-p)
-	   (not current-prefix-arg)
-	   (not (eq last-command-char ?\r)))
+	   (not current-prefix-arg))
       default-directory
-    (read-directory-name msg nil default-directory nil)))
+    (read-directory-name prompt nil default-directory nil)))
 
 ;;;###autoload
 (defun cvs-quickdir (dir &optional flags noshow)
--8<---------------cut here---------------end--------------->8---

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

  reply	other threads:[~2007-08-22 20:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-20 19:22 PCL-CVS: M-x cvs-update vs. key binding in *cvs* buffer Reiner Steib
2007-08-21 15:22 ` Stefan Monnier
2007-08-22 20:07   ` Reiner Steib [this message]
2007-08-22 20:29     ` Stefan Monnier
2007-08-25 12:27       ` Reiner Steib

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

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

  git send-email \
    --in-reply-to=v9tzqruycg.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.