From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.devel Subject: Re: PCL-CVS: M-x cvs-update vs. key binding in *cvs* buffer Date: Wed, 22 Aug 2007 22:07:59 +0200 Message-ID: References: Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1187813321 12234 80.91.229.12 (22 Aug 2007 20:08:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Aug 2007 20:08:41 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 22 22:08:33 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1INwVC-00080A-5E for ged-emacs-devel@m.gmane.org; Wed, 22 Aug 2007 22:08:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1INwVB-00017M-N0 for ged-emacs-devel@m.gmane.org; Wed, 22 Aug 2007 16:08:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1INwV3-0000wx-G7 for emacs-devel@gnu.org; Wed, 22 Aug 2007 16:08:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1INwV0-0000rP-Iy for emacs-devel@gnu.org; Wed, 22 Aug 2007 16:08:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1INwV0-0000r9-GC for emacs-devel@gnu.org; Wed, 22 Aug 2007 16:08:18 -0400 Original-Received: from mail.uni-ulm.de ([134.60.1.11]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1INwV0-0002tu-74 for emacs-devel@gnu.org; Wed, 22 Aug 2007 16:08:18 -0400 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by mail.uni-ulm.de (8.14.1/8.14.1) with ESMTP id l7MK8FUA017145; Wed, 22 Aug 2007 22:08:15 +0200 (MEST) Original-Received: from localhost (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by bridgekeeper.physik.uni-ulm.de (Postfix) with ESMTP id 7661712C44; Wed, 22 Aug 2007 22:08:15 +0200 (CEST) X-Face: 3Phac&+dw=IZHjhua]bp}LH<*p{qzj8u+ List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:76984 Archived-At: 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/