comparison lisp/pcvs.el @ 34408:0f95f2e53b1f

Update references to CVS-Edit (now Log-Edit). (cvs-mode-diff-help): Remove. (cvs-mode-commit): Use the new `log-edit' BUFFER argument.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 10 Dec 2000 21:20:56 +0000
parents 25976c39c41e
children da1ec51d3da7
comparison
equal deleted inserted replaced
34407:bcedf6eef407 34408:0f95f2e53b1f
12 ;; (Greg Klanderman) greg@alphatech.com 12 ;; (Greg Klanderman) greg@alphatech.com
13 ;; (Jari Aalto+mail.emacs) jari.aalto@poboxes.com 13 ;; (Jari Aalto+mail.emacs) jari.aalto@poboxes.com
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.19 2000/12/06 19:36:20 fx Exp $ 17 ;; Revision: $Id: pcvs.el,v 1.20 2000/12/08 16:58:45 monnier Exp $
18 18
19 ;; This file is part of GNU Emacs. 19 ;; This file is part of GNU Emacs.
20 20
21 ;; GNU Emacs is free software; you can redistribute it and/or modify 21 ;; GNU Emacs is free software; you can redistribute it and/or modify
22 ;; it under the terms of the GNU General Public License as published by 22 ;; it under the terms of the GNU General Public License as published by
1067 1067
1068 (defun cvs-help () 1068 (defun cvs-help ()
1069 "Display help for various PCL-CVS commands." 1069 "Display help for various PCL-CVS commands."
1070 (interactive) 1070 (interactive)
1071 (if (eq last-command 'cvs-help) 1071 (if (eq last-command 'cvs-help)
1072 (describe-function 'cvs-mode) ; would need minor-mode for cvs-edit-mode 1072 (describe-function 'cvs-mode) ; would need minor-mode for log-edit-mode
1073 (message 1073 (message
1074 (substitute-command-keys 1074 (substitute-command-keys
1075 "`\\[cvs-help]':help `\\[cvs-mode-add]':add `\\[cvs-mode-commit]':commit \ 1075 "`\\[cvs-help]':help `\\[cvs-mode-add]':add `\\[cvs-mode-commit]':commit \
1076 `\\[cvs-mode-diff-map]':diff* `\\[cvs-mode-log]':log \ 1076 `\\[cvs-mode-diff-map]':diff* `\\[cvs-mode-log]':log \
1077 `\\[cvs-mode-remove]':remove `\\[cvs-mode-status]':status \ 1077 `\\[cvs-mode-remove]':remove `\\[cvs-mode-status]':status \
1078 `\\[cvs-mode-undo]':undo")))) 1078 `\\[cvs-mode-undo]':undo"))))
1079
1080 (defun cvs-mode-diff-help ()
1081 "Display help for various PCL-CVS diff commands."
1082 (interactive)
1083 (if (eq last-command 'cvs-mode-diff-help)
1084 (describe-function 'cvs-mode) ; no better docs for diff stuff?
1085 (message
1086 (substitute-command-keys
1087 "`\\[cvs-mode-diff]':diff `\\[cvs-mode-idiff]':idiff \
1088 `\\[cvs-mode-diff-head]':head `\\[cvs-mode-diff-vendor]':vendor \
1089 `\\[cvs-mode-diff-backup]':backup `\\[cvs-mode-idiff-other]':other \
1090 `\\[cvs-mode-imerge]':imerge"))))
1091 1079
1092 ;; Move around in the buffer 1080 ;; Move around in the buffer
1093 1081
1094 (defun-cvs-mode cvs-mode-previous-line (arg) 1082 (defun-cvs-mode cvs-mode-previous-line (arg)
1095 "Go to the previous line. 1083 "Go to the previous line.
1288 (lambda () 1276 (lambda ()
1289 (mapcar 'cvs-fileinfo->full-path 1277 (mapcar 'cvs-fileinfo->full-path
1290 (apply 'cvs-mode-marked -cvs-mode-files-args))))) 1278 (apply 'cvs-mode-marked -cvs-mode-files-args)))))
1291 1279
1292 ;;; 1280 ;;;
1293 ;;; Interface between CVS-Edit and PCL-CVS 1281 ;;; Interface between Log-Edit and PCL-CVS
1294 ;;; 1282 ;;;
1295 1283
1296 (defun cvs-mode-commit-setup () 1284 (defun cvs-mode-commit-setup ()
1297 "Run `cvs-mode-commit' with setup." 1285 "Run `cvs-mode-commit' with setup."
1298 (interactive) 1286 (interactive)
1301 (defun cvs-mode-commit (setup) 1289 (defun cvs-mode-commit (setup)
1302 "Check in all marked files, or the current file. 1290 "Check in all marked files, or the current file.
1303 The user will be asked for a log message in a buffer. 1291 The user will be asked for a log message in a buffer.
1304 The buffer's mode and name is determined by the \"message\" setting 1292 The buffer's mode and name is determined by the \"message\" setting
1305 of `cvs-buffer-name-alist'. 1293 of `cvs-buffer-name-alist'.
1306 The POSTPROC specified there (typically `cvs-edit') is then called, 1294 The POSTPROC specified there (typically `log-edit') is then called,
1307 passing it the SETUP argument." 1295 passing it the SETUP argument."
1308 (interactive "P") 1296 (interactive "P")
1309 ;; It seems that the save-excursion that happens if I use the better 1297 ;; It seems that the save-excursion that happens if I use the better
1310 ;; form of `(cvs-mode! (lambda ...))' screws up a couple things which 1298 ;; form of `(cvs-mode! (lambda ...))' screws up a couple things which
1311 ;; end up being rather annoying (like cvs-edit-mode's message being 1299 ;; end up being rather annoying (like log-edit-mode's message being
1312 ;; displayed in the wrong minibuffer). 1300 ;; displayed in the wrong minibuffer).
1313 (cvs-mode!) 1301 (cvs-mode!)
1314 (pop-to-buffer (cvs-temp-buffer "message" 'normal 'nosetup)) 1302 (let ((buf (cvs-temp-buffer "message" 'normal 'nosetup))
1315 (set (make-local-variable 'cvs-minor-wrap-function) 'cvs-commit-minor-wrap) 1303 (lbd list-buffers-directory)
1316 (let ((lbd list-buffers-directory)
1317 (setupfun (or (nth 2 (cdr (assoc "message" cvs-buffer-name-alist))) 1304 (setupfun (or (nth 2 (cdr (assoc "message" cvs-buffer-name-alist)))
1318 'cvs-edit))) 1305 'log-edit)))
1319 (funcall setupfun 'cvs-do-commit setup 'cvs-commit-filelist) 1306 (funcall setupfun 'cvs-do-commit setup 'cvs-commit-filelist buf)
1307 (set (make-local-variable 'cvs-minor-wrap-function) 'cvs-commit-minor-wrap)
1320 (set (make-local-variable 'list-buffers-directory) lbd))) 1308 (set (make-local-variable 'list-buffers-directory) lbd)))
1321 1309
1322 (defun cvs-commit-minor-wrap (buf f) 1310 (defun cvs-commit-minor-wrap (buf f)
1323 (let ((cvs-ignore-marks-modif (cvs-mode-mark-get-modif "commit"))) 1311 (let ((cvs-ignore-marks-modif (cvs-mode-mark-get-modif "commit")))
1324 (funcall f))) 1312 (funcall f)))