Mercurial > emacs
comparison lisp/pcvs.el @ 40479:2930fd135efa
(cvs-mode-commit-hook): New hook.
(cvs-mode-commit): Run it.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 30 Oct 2001 04:41:28 +0000 |
parents | 11216aa2d43c |
children | d31a6beb070e |
comparison
equal
deleted
inserted
replaced
40478:4d0323a1ed72 | 40479:2930fd135efa |
---|---|
11 ;; (Stefan Monnier) monnier@cs.yale.edu | 11 ;; (Stefan Monnier) monnier@cs.yale.edu |
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 ;; Revision: $Id: pcvs.el,v 1.28 2001/07/16 07:46:48 pj Exp $ | 16 ;; Revision: $Id: pcvs.el,v 1.29 2001/09/22 20:23:16 monnier Exp $ |
17 | 17 |
18 ;; This file is part of GNU Emacs. | 18 ;; This file is part of GNU Emacs. |
19 | 19 |
20 ;; GNU Emacs is free software; you can redistribute it and/or modify | 20 ;; GNU Emacs is free software; you can redistribute it and/or modify |
21 ;; it under the terms of the GNU General Public License as published by | 21 ;; it under the terms of the GNU General Public License as published by |
1311 (defun cvs-mode-commit-setup () | 1311 (defun cvs-mode-commit-setup () |
1312 "Run `cvs-mode-commit' with setup." | 1312 "Run `cvs-mode-commit' with setup." |
1313 (interactive) | 1313 (interactive) |
1314 (cvs-mode-commit 'force)) | 1314 (cvs-mode-commit 'force)) |
1315 | 1315 |
1316 (defcustom cvs-mode-commit-hook nil | |
1317 "Hook run after setting up the commit buffer." | |
1318 :type 'hook | |
1319 :options '(cvs-mode-diff)) | |
1320 | |
1316 (defun cvs-mode-commit (setup) | 1321 (defun cvs-mode-commit (setup) |
1317 "Check in all marked files, or the current file. | 1322 "Check in all marked files, or the current file. |
1318 The user will be asked for a log message in a buffer. | 1323 The user will be asked for a log message in a buffer. |
1319 The buffer's mode and name is determined by the \"message\" setting | 1324 The buffer's mode and name is determined by the \"message\" setting |
1320 of `cvs-buffer-name-alist'. | 1325 of `cvs-buffer-name-alist'. |
1330 (lbd list-buffers-directory) | 1335 (lbd list-buffers-directory) |
1331 (setupfun (or (nth 2 (cdr (assoc "message" cvs-buffer-name-alist))) | 1336 (setupfun (or (nth 2 (cdr (assoc "message" cvs-buffer-name-alist))) |
1332 'log-edit))) | 1337 'log-edit))) |
1333 (funcall setupfun 'cvs-do-commit setup 'cvs-commit-filelist buf) | 1338 (funcall setupfun 'cvs-do-commit setup 'cvs-commit-filelist buf) |
1334 (set (make-local-variable 'cvs-minor-wrap-function) 'cvs-commit-minor-wrap) | 1339 (set (make-local-variable 'cvs-minor-wrap-function) 'cvs-commit-minor-wrap) |
1335 (set (make-local-variable 'list-buffers-directory) lbd))) | 1340 (set (make-local-variable 'list-buffers-directory) lbd) |
1341 (run-hooks 'cvs-mode-commit-hook))) | |
1336 | 1342 |
1337 (defun cvs-commit-minor-wrap (buf f) | 1343 (defun cvs-commit-minor-wrap (buf f) |
1338 (let ((cvs-ignore-marks-modif (cvs-mode-mark-get-modif "commit"))) | 1344 (let ((cvs-ignore-marks-modif (cvs-mode-mark-get-modif "commit"))) |
1339 (funcall f))) | 1345 (funcall f))) |
1340 | 1346 |