aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2000-06-02 02:28:39 +0000
committerStefan Monnier2000-06-02 02:28:39 +0000
commit1be77002377c20f88ca33fdc2c990d5ed35e02a8 (patch)
treecad9d82c1f85459f2f6f3f6d754b9e3bc769e585
parentc5def0db86105ac657a6df9eeb9df5b8452adf03 (diff)
downloademacs-1be77002377c20f88ca33fdc2c990d5ed35e02a8.tar.gz
emacs-1be77002377c20f88ca33fdc2c990d5ed35e02a8.zip
(log-edit-mode): Make vc-comment-ring-index local.
(log-edit-done): Only add the comment to the ring if it's different from the last comment entered.
-rw-r--r--lisp/log-edit.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/log-edit.el b/lisp/log-edit.el
index baba75e08c5..8f9d28326e0 100644
--- a/lisp/log-edit.el
+++ b/lisp/log-edit.el
@@ -5,7 +5,7 @@
5;; Author: Stefan Monnier <monnier@cs.yale.edu> 5;; Author: Stefan Monnier <monnier@cs.yale.edu>
6;; Keywords: pcl-cvs cvs commit log 6;; Keywords: pcl-cvs cvs commit log
7;; Version: $Name: $ 7;; Version: $Name: $
8;; Revision: $Id: log-edit.el,v 1.4 2000/05/10 22:20:51 monnier Exp $ 8;; Revision: $Id: log-edit.el,v 1.5 2000/05/21 02:13:26 monnier Exp $
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11 11
@@ -28,10 +28,8 @@
28 28
29;; Todo: 29;; Todo:
30 30
31;; - Remove a single leading `* <file>' in log-edit-insert-changelog
32;; - Move in VC's code 31;; - Move in VC's code
33;; - Add compatibility for VC's hook variables 32;; - Add compatibility for VC's hook variables
34;; - add compatibility with cvs-edit.el
35 33
36;;; Code: 34;;; Code:
37 35
@@ -177,7 +175,8 @@ Several other handy support commands are provided of course and
177the package from which this is used might also provide additional 175the package from which this is used might also provide additional
178commands (under C-x v for VC, for example). 176commands (under C-x v for VC, for example).
179 177
180\\{log-edit-mode-map}") 178\\{log-edit-mode-map}"
179 (make-local-variable 'vc-comment-ring-index))
181 180
182(defun log-edit-hide-buf (&optional buf where) 181(defun log-edit-hide-buf (&optional buf where)
183 (when (setq buf (get-buffer (or buf log-edit-files-buf))) 182 (when (setq buf (get-buffer (or buf log-edit-files-buf)))
@@ -205,7 +204,10 @@ If you want to abort the commit, simply delete the buffer."
205 (save-excursion 204 (save-excursion
206 (goto-char (point-max)) 205 (goto-char (point-max))
207 (insert ?\n))) 206 (insert ?\n)))
208 (if (boundp 'vc-comment-ring) (ring-insert vc-comment-ring (buffer-string))) 207 (let ((comment (buffer-string)))
208 (when (and (boundp 'vc-comment-ring) (ring-p vc-comment-ring)
209 (not (equal comment (ring-ref vc-comment-ring 0))))
210 (ring-insert vc-comment-ring comment)))
209 (let ((win (get-buffer-window log-edit-files-buf))) 211 (let ((win (get-buffer-window log-edit-files-buf)))
210 (if (and log-edit-confirm 212 (if (and log-edit-confirm
211 (not (and (eq log-edit-confirm 'changed) 213 (not (and (eq log-edit-confirm 'changed)