changeset 50764:394622821e83

(cvs-mode-find-file): Don't complain if bound to a non-mouse event. (cvs-vc-command-advice): Don't parse "cvs update -p" output.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 01 May 2003 00:46:41 +0000
parents 89b4fef23a86
children 43076e9d9aaa
files lisp/pcvs.el
diffstat 1 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/pcvs.el	Thu May 01 00:43:29 2003 +0000
+++ b/lisp/pcvs.el	Thu May 01 00:46:41 2003 +0000
@@ -14,7 +14,7 @@
 ;;	(Jari Aalto+mail.emacs) jari.aalto@poboxes.com
 ;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu
 ;; Keywords: CVS, version control, release management
-;; Revision: $Id: pcvs.el,v 1.50 2003/03/19 14:34:24 monnier Exp $
+;; Revision: $Id: pcvs.el,v 1.51 2003/04/20 22:03:00 sds Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -1899,10 +1899,11 @@
   "Select a buffer containing the file.
 With a prefix, opens the buffer in an OTHER window."
   (interactive (list last-input-event current-prefix-arg))
-  (when (ignore-errors (mouse-set-point e) t)	;for invocation via the mouse
-    (unless (memq (get-text-property (1- (line-end-position)) 'font-lock-face)
-		  '(cvs-header-face cvs-filename-face))
-      (error "Not a file name")))
+  ;; If the event moves point, check that it moves it to a valid location.
+  (when (and (/= (point) (progn (ignore-errors (mouse-set-point e)) (point)))
+	     (memq (get-text-property (1- (line-end-position)) 'font-lock-face)
+		   '(cvs-header-face cvs-filename-face)))
+    (error "Not a file name"))
   (cvs-mode!
    (lambda (&optional rev)
      (interactive (list (cvs-prefix-get 'cvs-branch-prefix)))
@@ -2229,7 +2230,12 @@
 			   (string-match "\\`-" (car flags)))
 		 (pop flags))
 	       ;; don't parse output we don't understand.
-	       (member (car flags) cvs-parse-known-commands)))
+	       (member (car flags) cvs-parse-known-commands))
+	     ;; Don't parse "update -p" output.
+	     (not (and (member (car flags) '("update" "checkout"))
+		       (let ((found-p nil))
+			 (dolist (flag flags found-p)
+			   (if (equal flag "-p") (setq found-p t)))))))
     (save-current-buffer
       (let ((buffer (current-buffer))
 	    (dir default-directory)