aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2000-08-09 15:28:06 +0000
committerStefan Monnier2000-08-09 15:28:06 +0000
commit96190aa1cb85d3e01098d2326cb433ea4cd8e30d (patch)
tree088efac37e37bf03df3fc3ec9603407f6c3cff59
parent55bd1088b1c334dddd81efdb86f721c9c6889535 (diff)
downloademacs-96190aa1cb85d3e01098d2326cb433ea4cd8e30d.tar.gz
emacs-96190aa1cb85d3e01098d2326cb433ea4cd8e30d.zip
(cvs-menu): Don't move point. Use popup-menu.
Set cvs-minor-current-files to the selected fileinfo. (cvs-get-marked): Accept fileinfos in cvs-minor-current-files. (cvs-mode-insert): Manually macroexpand `ignore-errors'.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/pcvs.el43
2 files changed, 32 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c70edb839e0..152d2dab7ac 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12000-08-09 Stefan Monnier <monnier@cs.yale.edu>
2
3 * pcvs.el (cvs-menu): Don't move point. Use popup-menu.
4 Set cvs-minor-current-files to the selected fileinfo.
5 (cvs-get-marked): Accept fileinfos in cvs-minor-current-files.
6 (cvs-mode-insert): Manually macroexpand `ignore-errors'.
7
12000-08-09 Eli Zaretskii <eliz@is.elta.co.il> 82000-08-09 Eli Zaretskii <eliz@is.elta.co.il>
2 9
3 * files.el (insert-directory): Don't call access-file on 10 * files.el (insert-directory): Don't call access-file on
diff --git a/lisp/pcvs.el b/lisp/pcvs.el
index c61ce429932..638744ec20a 100644
--- a/lisp/pcvs.el
+++ b/lisp/pcvs.el
@@ -14,7 +14,7 @@
14;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu 14;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu
15;; Keywords: CVS, version control, release management 15;; Keywords: CVS, version control, release management
16;; Version: $Name: $ 16;; Version: $Name: $
17;; Revision: $Id: pcvs.el,v 1.6 2000/08/05 20:08:49 gerd Exp $ 17;; Revision: $Id: pcvs.el,v 1.7 2000/08/06 09:18:00 gerd Exp $
18 18
19;; This file is part of GNU Emacs. 19;; This file is part of GNU Emacs.
20 20
@@ -50,13 +50,13 @@
50;; seamlessly (I also use VC). 50;; seamlessly (I also use VC).
51 51
52;; To use PCL-CVS just use `M-x cvs-examine RET <dir> RET'. 52;; To use PCL-CVS just use `M-x cvs-examine RET <dir> RET'.
53;; There used to be a TeXinfo manual, but it's now so out of date that 53;; There is a TeXinfo manual, which can be helpful to get started.
54;; it's not even worth looking at it.
55 54
56;;; Todo: 55;;; Todo:
57 56
58;; ******** FIX THE DOCUMENTATION ********* 57;; ******** FIX THE DOCUMENTATION *********
59;; 58;;
59;; - hide fileinfos without getting rid of them (will require ewok work).
60;; - proper `g' that passes safe args and uses either cvs-status or cvs-examine 60;; - proper `g' that passes safe args and uses either cvs-status or cvs-examine
61;; - add toolbar entries 61;; - add toolbar entries
62;; - marking 62;; - marking
@@ -188,8 +188,10 @@
188(defun cvs-menu (e) 188(defun cvs-menu (e)
189 "Popup the CVS menu." 189 "Popup the CVS menu."
190 (interactive "e") 190 (interactive "e")
191 (mouse-set-point e) 191 (let ((cvs-minor-current-files
192 (x-popup-menu e cvs-menu-map)) 192 (list (ewoc-data (ewoc-locate
193 cvs-cookies (posn-point (event-end e)))))))
194 (popup-menu cvs-menu-map e)))
193 195
194(defvar cvs-mode-line-process nil 196(defvar cvs-mode-line-process nil
195 "Mode-line control for displaying info on cvs process status.") 197 "Mode-line control for displaying info on cvs process status.")
@@ -1216,17 +1218,19 @@ an empty list if it doesn't point to a file at all.
1216Args: &optional IGNORE-MARKS IGNORE-CONTENTS." 1218Args: &optional IGNORE-MARKS IGNORE-CONTENTS."
1217 1219
1218 (let ((fis nil)) 1220 (let ((fis nil))
1219 (dolist (fi (if (boundp 'cvs-minor-current-files) 1221 (dolist (fi (if (and (boundp 'cvs-minor-current-files)
1222 (consp cvs-minor-current-files))
1220 (mapcar 1223 (mapcar
1221 (lambda (f) 1224 (lambda (f)
1222 (let ((f (file-relative-name f))) 1225 (if (cvs-fileinfo-p f) f
1223 (if (file-directory-p f) 1226 (let ((f (file-relative-name f)))
1224 (cvs-create-fileinfo 1227 (if (file-directory-p f)
1225 'DIRCHANGE (file-name-as-directory f) "." "") 1228 (cvs-create-fileinfo
1226 (let ((dir (file-name-directory f)) 1229 'DIRCHANGE (file-name-as-directory f) "." "")
1227 (file (file-name-nondirectory f))) 1230 (let ((dir (file-name-directory f))
1228 (cvs-create-fileinfo 1231 (file (file-name-nondirectory f)))
1229 'UNKNOWN (or dir "") file ""))))) 1232 (cvs-create-fileinfo
1233 'UNKNOWN (or dir "") file ""))))))
1230 cvs-minor-current-files) 1234 cvs-minor-current-files)
1231 (or (and (not ignore-marks) 1235 (or (and (not ignore-marks)
1232 (ewoc-collect cvs-cookies 1236 (ewoc-collect cvs-cookies
@@ -1329,9 +1333,12 @@ The POSTPROC specified there (typically `cvs-edit') is then called,
1329 "Insert an entry for a specific file." 1333 "Insert an entry for a specific file."
1330 (interactive 1334 (interactive
1331 (list (read-file-name "File to insert: " nil nil nil 1335 (list (read-file-name "File to insert: " nil nil nil
1332 (ignore-errors 1336 ;; Can't use ignore-errors here because interactive
1333 (cvs-fileinfo->dir 1337 ;; specs aren't byte-compiled.
1334 (car (cvs-mode-marked nil nil :read-only t))))))) 1338 (condition-case nil
1339 (cvs-fileinfo->dir
1340 (car (cvs-mode-marked nil nil :read-only t)))
1341 (error nil)))))
1335 (let ((file (file-relative-name (directory-file-name file))) last) 1342 (let ((file (file-relative-name (directory-file-name file))) last)
1336 (dolist (fi (cvs-fileinfo-from-entries file)) 1343 (dolist (fi (cvs-fileinfo-from-entries file))
1337 (setq last (cvs-addto-collection cvs-cookies fi last))))) 1344 (setq last (cvs-addto-collection cvs-cookies fi last)))))