2000-03-11 03:51:31 +00:00
|
|
|
|
;;; log-edit.el --- Major mode for editing CVS commit messages
|
|
|
|
|
|
2010-01-28 05:19:23 +00:00
|
|
|
|
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
|
|
|
|
;; 2008, 2009, 2010 Free Software Foundation, Inc.
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
2006-04-30 15:49:08 +00:00
|
|
|
|
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
|
2000-03-11 03:51:31 +00:00
|
|
|
|
;; Keywords: pcl-cvs cvs commit log
|
|
|
|
|
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
2008-05-06 08:06:51 +00:00
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
2000-03-11 03:51:31 +00:00
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2008-05-06 08:06:51 +00:00
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2008-05-06 08:06:51 +00:00
|
|
|
|
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
|
|
|
|
;; Todo:
|
|
|
|
|
|
|
|
|
|
;; - Move in VC's code
|
|
|
|
|
;; - Add compatibility for VC's hook variables
|
|
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
|
|
(eval-when-compile (require 'cl))
|
|
|
|
|
(require 'add-log) ; for all the ChangeLog goodies
|
|
|
|
|
(require 'pcvs-util)
|
|
|
|
|
(require 'ring)
|
|
|
|
|
|
2003-02-04 12:29:42 +00:00
|
|
|
|
;;;;
|
2000-03-11 03:51:31 +00:00
|
|
|
|
;;;; Global Variables
|
2003-02-04 12:29:42 +00:00
|
|
|
|
;;;;
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
|
|
|
|
(defgroup log-edit nil
|
2000-10-24 11:27:41 +00:00
|
|
|
|
"Major mode for editing RCS and CVS commit messages."
|
2000-03-11 03:51:31 +00:00
|
|
|
|
:group 'pcl-cvs
|
2000-10-24 11:27:41 +00:00
|
|
|
|
:group 'vc ; It's used by VC.
|
|
|
|
|
:version "21.1"
|
2000-03-11 03:51:31 +00:00
|
|
|
|
:prefix "log-edit-")
|
|
|
|
|
|
|
|
|
|
;; compiler pacifiers
|
|
|
|
|
(defvar cvs-buffer)
|
|
|
|
|
|
2003-05-18 02:46:56 +00:00
|
|
|
|
|
|
|
|
|
;; The main keymap
|
|
|
|
|
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(easy-mmode-defmap log-edit-mode-map
|
|
|
|
|
`(("\C-c\C-c" . log-edit-done)
|
|
|
|
|
("\C-c\C-a" . log-edit-insert-changelog)
|
2007-12-01 19:37:20 +00:00
|
|
|
|
("\C-c\C-d" . log-edit-show-diff)
|
2000-03-11 03:51:31 +00:00
|
|
|
|
("\C-c\C-f" . log-edit-show-files)
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
("\M-n" . log-edit-next-comment)
|
|
|
|
|
("\M-p" . log-edit-previous-comment)
|
|
|
|
|
("\M-r" . log-edit-comment-search-backward)
|
|
|
|
|
("\M-s" . log-edit-comment-search-forward)
|
2003-05-18 03:01:22 +00:00
|
|
|
|
("\C-c?" . log-edit-mode-help))
|
2000-12-10 21:08:55 +00:00
|
|
|
|
"Keymap for the `log-edit-mode' (to edit version control log messages)."
|
2003-05-18 03:01:22 +00:00
|
|
|
|
:group 'log-edit)
|
|
|
|
|
|
|
|
|
|
;; Compatibility with old names. Should we bother ?
|
|
|
|
|
(defvar vc-log-mode-map log-edit-mode-map)
|
|
|
|
|
(defvar vc-log-entry-mode vc-log-mode-map)
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
2000-11-03 20:12:20 +00:00
|
|
|
|
(easy-menu-define log-edit-menu log-edit-mode-map
|
|
|
|
|
"Menu used for `log-edit-mode'."
|
|
|
|
|
'("Log-Edit"
|
|
|
|
|
["Done" log-edit-done
|
|
|
|
|
:help "Exit log-edit and proceed with the actual action."]
|
|
|
|
|
"--"
|
2008-04-09 06:15:13 +00:00
|
|
|
|
["Insert ChangeLog" log-edit-insert-changelog
|
|
|
|
|
:help "Insert a log message by looking at the ChangeLog"]
|
|
|
|
|
["Add to ChangeLog" log-edit-add-to-changelog
|
|
|
|
|
:help "Insert this log message into the appropriate ChangeLog file"]
|
2000-11-03 20:12:20 +00:00
|
|
|
|
"--"
|
2007-12-01 19:37:20 +00:00
|
|
|
|
["Show diff" log-edit-show-diff
|
|
|
|
|
:help "Show the diff for the files to be committed."]
|
2000-11-03 20:12:20 +00:00
|
|
|
|
["List files" log-edit-show-files
|
|
|
|
|
:help "Show the list of relevant files."]
|
|
|
|
|
"--"
|
2008-04-09 06:15:13 +00:00
|
|
|
|
["Previous comment" log-edit-previous-comment
|
|
|
|
|
:help "Cycle backwards through comment history"]
|
|
|
|
|
["Next comment" log-edit-next-comment
|
|
|
|
|
:help "Cycle forwards through comment history."]
|
|
|
|
|
["Search comment forward" log-edit-comment-search-forward
|
|
|
|
|
:help "Search forwards through comment history for a substring match of str"]
|
|
|
|
|
["Search comment backward" log-edit-comment-search-backward
|
|
|
|
|
:help "Search backwards through comment history for substring match of str"]))
|
2000-11-03 20:12:20 +00:00
|
|
|
|
|
2000-10-30 14:28:30 +00:00
|
|
|
|
(defcustom log-edit-confirm 'changed
|
2008-12-03 05:48:14 +00:00
|
|
|
|
"If non-nil, `log-edit-done' will request confirmation.
|
2000-03-11 03:51:31 +00:00
|
|
|
|
If 'changed, only request confirmation if the list of files has
|
|
|
|
|
changed since the beginning of the log-edit session."
|
|
|
|
|
:group 'log-edit
|
|
|
|
|
:type '(choice (const changed) (const t) (const nil)))
|
|
|
|
|
|
|
|
|
|
(defcustom log-edit-keep-buffer nil
|
2008-12-03 05:48:14 +00:00
|
|
|
|
"If non-nil, don't hide the buffer after `log-edit-done'."
|
2000-03-11 03:51:31 +00:00
|
|
|
|
:group 'log-edit
|
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
2003-02-05 23:11:02 +00:00
|
|
|
|
(defvar cvs-commit-buffer-require-final-newline t)
|
|
|
|
|
(make-obsolete-variable 'cvs-commit-buffer-require-final-newline
|
2008-04-18 10:29:55 +00:00
|
|
|
|
'log-edit-require-final-newline
|
|
|
|
|
"21.1")
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
|
|
|
|
(defcustom log-edit-require-final-newline
|
|
|
|
|
cvs-commit-buffer-require-final-newline
|
2008-12-03 05:48:14 +00:00
|
|
|
|
"Enforce a newline at the end of commit log messages.
|
2000-03-11 03:51:31 +00:00
|
|
|
|
Enforce it silently if t, query if non-nil and don't do anything if nil."
|
|
|
|
|
:group 'log-edit
|
|
|
|
|
:type '(choice (const ask) (const t) (const nil)))
|
|
|
|
|
|
|
|
|
|
(defcustom log-edit-setup-invert nil
|
2008-12-03 05:48:14 +00:00
|
|
|
|
"Non-nil means `log-edit' should invert the meaning of its SETUP arg.
|
2000-03-11 03:51:31 +00:00
|
|
|
|
If SETUP is 'force, this variable has no effect."
|
|
|
|
|
:group 'log-edit
|
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
|
|
|
|
(defcustom log-edit-hook '(log-edit-insert-cvs-template
|
|
|
|
|
log-edit-insert-changelog)
|
2008-12-03 05:48:14 +00:00
|
|
|
|
"Hook run at the end of `log-edit'."
|
2000-03-11 03:51:31 +00:00
|
|
|
|
:group 'log-edit
|
2005-11-28 20:22:04 +00:00
|
|
|
|
:type '(hook :options (log-edit-insert-changelog
|
|
|
|
|
log-edit-insert-cvs-rcstemplate
|
|
|
|
|
log-edit-insert-cvs-template
|
|
|
|
|
log-edit-insert-filenames)))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
2000-03-26 23:05:27 +00:00
|
|
|
|
(defcustom log-edit-mode-hook (if (boundp 'vc-log-mode-hook) vc-log-mode-hook)
|
2008-12-03 05:48:14 +00:00
|
|
|
|
"Hook run when entering `log-edit-mode'."
|
2000-03-11 03:51:31 +00:00
|
|
|
|
:group 'log-edit
|
|
|
|
|
:type 'hook)
|
|
|
|
|
|
|
|
|
|
(defcustom log-edit-done-hook nil
|
2008-12-03 05:48:14 +00:00
|
|
|
|
"Hook run before doing the actual commit.
|
2000-03-11 03:51:31 +00:00
|
|
|
|
This hook can be used to cleanup the message, enforce various
|
|
|
|
|
conventions, or to allow recording the message in some other database,
|
|
|
|
|
such as a bug-tracking system. The list of files about to be committed
|
|
|
|
|
can be obtained from `log-edit-files'."
|
|
|
|
|
:group 'log-edit
|
2001-03-07 00:26:25 +00:00
|
|
|
|
:type '(hook :options (log-edit-set-common-indentation
|
2000-03-11 03:51:31 +00:00
|
|
|
|
log-edit-add-to-changelog)))
|
|
|
|
|
|
2009-08-19 19:55:58 +00:00
|
|
|
|
(defcustom log-edit-strip-single-file-name t
|
|
|
|
|
"If non-nil, remove file name from single-file log entries."
|
2010-01-28 05:19:23 +00:00
|
|
|
|
:type 'boolean
|
|
|
|
|
:safe 'booleanp
|
|
|
|
|
:group 'log-edit
|
|
|
|
|
:version "23.2")
|
2009-08-19 19:55:58 +00:00
|
|
|
|
|
2003-02-05 23:11:02 +00:00
|
|
|
|
(defvar cvs-changelog-full-paragraphs t)
|
|
|
|
|
(make-obsolete-variable 'cvs-changelog-full-paragraphs
|
2008-04-18 10:29:55 +00:00
|
|
|
|
'log-edit-changelog-full-paragraphs
|
|
|
|
|
"21.1")
|
2000-05-10 22:20:51 +00:00
|
|
|
|
|
|
|
|
|
(defvar log-edit-changelog-full-paragraphs cvs-changelog-full-paragraphs
|
|
|
|
|
"*If non-nil, include full ChangeLog paragraphs in the log.
|
2000-03-11 03:51:31 +00:00
|
|
|
|
This may be set in the ``local variables'' section of a ChangeLog, to
|
|
|
|
|
indicate the policy for that ChangeLog.
|
|
|
|
|
|
|
|
|
|
A ChangeLog paragraph is a bunch of log text containing no blank lines;
|
|
|
|
|
a paragraph usually describes a set of changes with a single purpose,
|
|
|
|
|
but perhaps spanning several functions in several files. Changes in
|
|
|
|
|
different paragraphs are unrelated.
|
|
|
|
|
|
2000-05-10 22:20:51 +00:00
|
|
|
|
You could argue that the log entry for a file should contain the
|
2000-03-11 03:51:31 +00:00
|
|
|
|
full ChangeLog paragraph mentioning the change to the file, even though
|
|
|
|
|
it may mention other files, because that gives you the full context you
|
2005-06-10 14:05:27 +00:00
|
|
|
|
need to understand the change. This is the behavior you get when this
|
2000-03-11 03:51:31 +00:00
|
|
|
|
variable is set to t.
|
|
|
|
|
|
2000-05-10 22:20:51 +00:00
|
|
|
|
On the other hand, you could argue that the log entry for a change
|
2000-03-11 03:51:31 +00:00
|
|
|
|
should contain only the text for the changes which occurred in that
|
2005-06-10 14:05:27 +00:00
|
|
|
|
file, because the log is per-file. This is the behavior you get
|
2000-03-11 03:51:31 +00:00
|
|
|
|
when this variable is set to nil.")
|
|
|
|
|
|
|
|
|
|
;;;; Internal global or buffer-local vars
|
|
|
|
|
|
|
|
|
|
(defconst log-edit-files-buf "*log-edit-files*")
|
|
|
|
|
(defvar log-edit-initial-files nil)
|
|
|
|
|
(defvar log-edit-callback nil)
|
2007-12-01 19:37:20 +00:00
|
|
|
|
(defvar log-edit-diff-function nil)
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(defvar log-edit-listfun nil)
|
2000-12-10 21:08:55 +00:00
|
|
|
|
(defvar log-edit-parent-buffer nil)
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
;;; Originally taken from VC-Log mode
|
2003-05-18 02:46:56 +00:00
|
|
|
|
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(defconst log-edit-maximum-comment-ring-size 32
|
2003-05-18 02:46:56 +00:00
|
|
|
|
"Maximum number of saved comments in the comment ring.")
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(defvar log-edit-comment-ring (make-ring log-edit-maximum-comment-ring-size))
|
|
|
|
|
(defvar log-edit-comment-ring-index nil)
|
|
|
|
|
(defvar log-edit-last-comment-match "")
|
2003-05-18 02:46:56 +00:00
|
|
|
|
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(defun log-edit-new-comment-index (stride len)
|
2003-05-18 02:46:56 +00:00
|
|
|
|
"Return the comment index STRIDE elements from the current one.
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
LEN is the length of `log-edit-comment-ring'."
|
2003-05-18 02:46:56 +00:00
|
|
|
|
(mod (cond
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(log-edit-comment-ring-index (+ log-edit-comment-ring-index stride))
|
2003-05-18 02:46:56 +00:00
|
|
|
|
;; Initialize the index on the first use of this command
|
|
|
|
|
;; so that the first M-p gets index 0, and the first M-n gets
|
|
|
|
|
;; index -1.
|
|
|
|
|
((> stride 0) (1- stride))
|
|
|
|
|
(t stride))
|
|
|
|
|
len))
|
|
|
|
|
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(defun log-edit-previous-comment (arg)
|
2003-05-18 02:46:56 +00:00
|
|
|
|
"Cycle backwards through comment history.
|
|
|
|
|
With a numeric prefix ARG, go back ARG comments."
|
|
|
|
|
(interactive "*p")
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(let ((len (ring-length log-edit-comment-ring)))
|
2003-05-18 02:46:56 +00:00
|
|
|
|
(if (<= len 0)
|
|
|
|
|
(progn (message "Empty comment ring") (ding))
|
2003-05-18 03:01:22 +00:00
|
|
|
|
;; Don't use `erase-buffer' because we don't want to `widen'.
|
|
|
|
|
(delete-region (point-min) (point-max))
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(setq log-edit-comment-ring-index (log-edit-new-comment-index arg len))
|
|
|
|
|
(message "Comment %d" (1+ log-edit-comment-ring-index))
|
|
|
|
|
(insert (ring-ref log-edit-comment-ring log-edit-comment-ring-index)))))
|
2003-05-18 02:46:56 +00:00
|
|
|
|
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(defun log-edit-next-comment (arg)
|
2003-05-18 02:46:56 +00:00
|
|
|
|
"Cycle forwards through comment history.
|
|
|
|
|
With a numeric prefix ARG, go forward ARG comments."
|
|
|
|
|
(interactive "*p")
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(log-edit-previous-comment (- arg)))
|
2003-05-18 02:46:56 +00:00
|
|
|
|
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(defun log-edit-comment-search-backward (str &optional stride)
|
2003-05-18 02:46:56 +00:00
|
|
|
|
"Search backwards through comment history for substring match of STR.
|
|
|
|
|
If the optional argument STRIDE is present, that is a step-width to use
|
|
|
|
|
when going through the comment ring."
|
|
|
|
|
;; Why substring rather than regexp ? -sm
|
|
|
|
|
(interactive
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(list (read-string "Comment substring: " nil nil log-edit-last-comment-match)))
|
2003-05-18 02:46:56 +00:00
|
|
|
|
(unless stride (setq stride 1))
|
|
|
|
|
(if (string= str "")
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(setq str log-edit-last-comment-match)
|
|
|
|
|
(setq log-edit-last-comment-match str))
|
2003-05-18 02:46:56 +00:00
|
|
|
|
(let* ((str (regexp-quote str))
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(len (ring-length log-edit-comment-ring))
|
|
|
|
|
(n (log-edit-new-comment-index stride len)))
|
2003-05-18 02:46:56 +00:00
|
|
|
|
(while (progn (when (or (>= n len) (< n 0)) (error "Not found"))
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(not (string-match str (ring-ref log-edit-comment-ring n))))
|
2003-05-18 02:46:56 +00:00
|
|
|
|
(setq n (+ n stride)))
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(setq log-edit-comment-ring-index n)
|
|
|
|
|
(log-edit-previous-comment 0)))
|
2003-05-18 02:46:56 +00:00
|
|
|
|
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(defun log-edit-comment-search-forward (str)
|
2003-05-18 02:46:56 +00:00
|
|
|
|
"Search forwards through comment history for a substring match of STR."
|
|
|
|
|
(interactive
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(list (read-string "Comment substring: " nil nil log-edit-last-comment-match)))
|
|
|
|
|
(log-edit-comment-search-backward str -1))
|
2003-05-18 02:46:56 +00:00
|
|
|
|
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(defun log-edit-comment-to-change-log (&optional whoami file-name)
|
2003-05-18 02:46:56 +00:00
|
|
|
|
"Enter last VC comment into the change log for the current file.
|
|
|
|
|
WHOAMI (interactive prefix) non-nil means prompt for user name
|
|
|
|
|
and site. FILE-NAME is the name of the change log; if nil, use
|
|
|
|
|
`change-log-default-name'.
|
|
|
|
|
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
This may be useful as a `log-edit-checkin-hook' to update change logs
|
2003-05-18 02:46:56 +00:00
|
|
|
|
automatically."
|
|
|
|
|
(interactive (if current-prefix-arg
|
|
|
|
|
(list current-prefix-arg
|
|
|
|
|
(prompt-for-change-log-name))))
|
|
|
|
|
(let (;; Extract the comment first so we get any error before doing anything.
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(comment (ring-ref log-edit-comment-ring 0))
|
2003-05-18 02:46:56 +00:00
|
|
|
|
;; Don't let add-change-log-entry insert a defun name.
|
|
|
|
|
(add-log-current-defun-function 'ignore)
|
|
|
|
|
end)
|
|
|
|
|
;; Call add-log to do half the work.
|
|
|
|
|
(add-change-log-entry whoami file-name t t)
|
|
|
|
|
;; Insert the VC comment, leaving point before it.
|
|
|
|
|
(setq end (save-excursion (insert comment) (point-marker)))
|
|
|
|
|
(if (looking-at "\\s *\\s(")
|
|
|
|
|
;; It starts with an open-paren, as in "(foo): Frobbed."
|
|
|
|
|
;; So remove the ": " add-log inserted.
|
|
|
|
|
(delete-char -2))
|
|
|
|
|
;; Canonicalize the white space between the file name and comment.
|
|
|
|
|
(just-one-space)
|
|
|
|
|
;; Indent rest of the text the same way add-log indented the first line.
|
|
|
|
|
(let ((indentation (current-indentation)))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(while (< (point) end)
|
|
|
|
|
(forward-line 1)
|
|
|
|
|
(indent-to indentation))
|
|
|
|
|
(setq end (point))))
|
|
|
|
|
;; Fill the inserted text, preserving open-parens at bol.
|
2003-05-18 03:01:22 +00:00
|
|
|
|
(let ((paragraph-start (concat paragraph-start "\\|\\s *\\s(")))
|
2003-05-18 02:46:56 +00:00
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(fill-region (point) end))
|
|
|
|
|
;; Canonicalize the white space at the end of the entry so it is
|
|
|
|
|
;; separated from the next entry by a single blank line.
|
|
|
|
|
(skip-syntax-forward " " end)
|
|
|
|
|
(delete-char (- (skip-syntax-backward " ")))
|
|
|
|
|
(or (eobp) (looking-at "\n\n")
|
|
|
|
|
(insert "\n"))))
|
|
|
|
|
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
;; Compatibility with old names.
|
2005-11-28 20:22:04 +00:00
|
|
|
|
(define-obsolete-variable-alias 'vc-comment-ring 'log-edit-comment-ring "22.1")
|
|
|
|
|
(define-obsolete-variable-alias 'vc-comment-ring-index 'log-edit-comment-ring-index "22.1")
|
|
|
|
|
(define-obsolete-function-alias 'vc-previous-comment 'log-edit-previous-comment "22.1")
|
|
|
|
|
(define-obsolete-function-alias 'vc-next-comment 'log-edit-next-comment "22.1")
|
|
|
|
|
(define-obsolete-function-alias 'vc-comment-search-reverse 'log-edit-comment-search-backward "22.1")
|
|
|
|
|
(define-obsolete-function-alias 'vc-comment-search-forward 'log-edit-comment-search-forward "22.1")
|
|
|
|
|
(define-obsolete-function-alias 'vc-comment-to-change-log 'log-edit-comment-to-change-log "22.1")
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
|
2000-12-10 21:08:55 +00:00
|
|
|
|
;;;
|
|
|
|
|
;;; Actual code
|
|
|
|
|
;;;
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
2004-03-18 19:29:33 +00:00
|
|
|
|
(defvar log-edit-font-lock-keywords
|
2004-03-18 02:48:51 +00:00
|
|
|
|
'(("\\`\\(Summary:\\)\\(.*\\)"
|
|
|
|
|
(1 font-lock-keyword-face)
|
|
|
|
|
(2 font-lock-function-name-face))))
|
|
|
|
|
|
2000-03-11 03:51:31 +00:00
|
|
|
|
;;;###autoload
|
2007-12-01 19:37:20 +00:00
|
|
|
|
(defun log-edit (callback &optional setup params buffer &rest ignore)
|
2000-03-11 03:51:31 +00:00
|
|
|
|
"Setup a buffer to enter a log message.
|
2000-10-30 14:28:30 +00:00
|
|
|
|
\\<log-edit-mode-map>The buffer will be put in `log-edit-mode'.
|
2000-03-11 03:51:31 +00:00
|
|
|
|
If SETUP is non-nil, the buffer is then erased and `log-edit-hook' is run.
|
2008-01-15 15:03:36 +00:00
|
|
|
|
Mark and point will be set around the entire contents of the buffer so
|
|
|
|
|
that it is easy to kill the contents of the buffer with \\[kill-region].
|
2000-03-11 03:51:31 +00:00
|
|
|
|
Once you're done editing the message, pressing \\[log-edit-done] will call
|
2000-12-10 21:08:55 +00:00
|
|
|
|
`log-edit-done' which will end up calling CALLBACK to do the actual commit.
|
2008-01-15 15:03:36 +00:00
|
|
|
|
|
|
|
|
|
PARAMS if non-nil is an alist. Possible keys and associated values:
|
|
|
|
|
`log-edit-listfun' -- function taking no arguments that returns the list of
|
|
|
|
|
files that are concerned by the current operation (using relative names);
|
|
|
|
|
`log-edit-diff-function' -- function taking no arguments that
|
|
|
|
|
displays a diff of the files concerned by the current operation.
|
|
|
|
|
|
2000-12-10 21:08:55 +00:00
|
|
|
|
If BUFFER is non-nil `log-edit' will jump to that buffer, use it to edit the
|
2008-01-15 15:03:36 +00:00
|
|
|
|
log message and go back to the current buffer when done. Otherwise, it
|
|
|
|
|
uses the current buffer."
|
2000-12-10 21:08:55 +00:00
|
|
|
|
(let ((parent (current-buffer)))
|
|
|
|
|
(if buffer (pop-to-buffer buffer))
|
|
|
|
|
(when (and log-edit-setup-invert (not (eq setup 'force)))
|
|
|
|
|
(setq setup (not setup)))
|
|
|
|
|
(when setup (erase-buffer))
|
|
|
|
|
(log-edit-mode)
|
|
|
|
|
(set (make-local-variable 'log-edit-callback) callback)
|
2007-12-01 19:37:20 +00:00
|
|
|
|
(if (listp params)
|
|
|
|
|
(dolist (crt params)
|
|
|
|
|
(set (make-local-variable (car crt)) (cdr crt)))
|
|
|
|
|
;; For backward compatibility with log-edit up to version 22.2
|
|
|
|
|
;; accept non-list PARAMS to mean `log-edit-list'.
|
|
|
|
|
(set (make-local-variable 'log-edit-listfun) params))
|
|
|
|
|
|
2000-12-10 21:08:55 +00:00
|
|
|
|
(if buffer (set (make-local-variable 'log-edit-parent-buffer) parent))
|
2001-10-30 04:32:58 +00:00
|
|
|
|
(set (make-local-variable 'log-edit-initial-files) (log-edit-files))
|
2000-12-10 21:08:55 +00:00
|
|
|
|
(when setup (run-hooks 'log-edit-hook))
|
|
|
|
|
(goto-char (point-min)) (push-mark (point-max))
|
2005-09-18 12:25:02 +00:00
|
|
|
|
(message "%s" (substitute-command-keys
|
2000-12-10 21:08:55 +00:00
|
|
|
|
"Press \\[log-edit-done] when you are done editing."))))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
|
|
|
|
(define-derived-mode log-edit-mode text-mode "Log-Edit"
|
2000-03-26 21:19:58 +00:00
|
|
|
|
"Major mode for editing version-control log messages.
|
|
|
|
|
When done editing the log entry, just type \\[log-edit-done] which
|
|
|
|
|
will trigger the actual commit of the file(s).
|
|
|
|
|
Several other handy support commands are provided of course and
|
|
|
|
|
the package from which this is used might also provide additional
|
|
|
|
|
commands (under C-x v for VC, for example).
|
|
|
|
|
|
2000-06-02 02:28:39 +00:00
|
|
|
|
\\{log-edit-mode-map}"
|
2004-03-18 02:48:51 +00:00
|
|
|
|
(set (make-local-variable 'font-lock-defaults)
|
|
|
|
|
'(log-edit-font-lock-keywords t))
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(make-local-variable 'log-edit-comment-ring-index))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
|
|
|
|
(defun log-edit-hide-buf (&optional buf where)
|
|
|
|
|
(when (setq buf (get-buffer (or buf log-edit-files-buf)))
|
|
|
|
|
(let ((win (get-buffer-window buf where)))
|
|
|
|
|
(if win (ignore-errors (delete-window win))))
|
|
|
|
|
(bury-buffer buf)))
|
|
|
|
|
|
|
|
|
|
(defun log-edit-done ()
|
|
|
|
|
"Finish editing the log message and commit the files.
|
|
|
|
|
If you want to abort the commit, simply delete the buffer."
|
|
|
|
|
(interactive)
|
2000-05-21 02:14:07 +00:00
|
|
|
|
;; Get rid of trailing empty lines
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(skip-syntax-backward " ")
|
|
|
|
|
(when (equal (char-after) ?\n) (forward-char 1))
|
|
|
|
|
(delete-region (point) (point-max))
|
|
|
|
|
;; Check for final newline
|
2000-12-10 21:08:55 +00:00
|
|
|
|
(if (and (> (point-max) (point-min))
|
|
|
|
|
(/= (char-before (point-max)) ?\n)
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(or (eq log-edit-require-final-newline t)
|
|
|
|
|
(and log-edit-require-final-newline
|
|
|
|
|
(y-or-n-p
|
|
|
|
|
(format "Buffer %s does not end in newline. Add one? "
|
|
|
|
|
(buffer-name))))))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(insert ?\n)))
|
2000-06-02 02:28:39 +00:00
|
|
|
|
(let ((comment (buffer-string)))
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(when (or (ring-empty-p log-edit-comment-ring)
|
|
|
|
|
(not (equal comment (ring-ref log-edit-comment-ring 0))))
|
|
|
|
|
(ring-insert log-edit-comment-ring comment)))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(let ((win (get-buffer-window log-edit-files-buf)))
|
|
|
|
|
(if (and log-edit-confirm
|
|
|
|
|
(not (and (eq log-edit-confirm 'changed)
|
|
|
|
|
(equal (log-edit-files) log-edit-initial-files)))
|
|
|
|
|
(progn
|
|
|
|
|
(log-edit-show-files)
|
2005-09-25 Romain Francoise <romain@orebokech.com>
* dired-aux.el (dired-copy-file-recursive):
* dired.el (dired-delete-file):
* ediff-mult.el (ediff-dir-diff-copy-file):
* ediff-util.el (ediff-test-save-region):
* forms.el (forms-mode):
* ido.el (ido-file-internal, ido-delete-file-at-head):
* log-edit.el (log-edit-done):
* ses.el (ses-yank-resize):
* play/gomoku.el (gomoku-human-plays, gomoku)
(gomoku-human-resigns, gomoku-prompt-for-other-game)
(gomoku-offer-a-draw):
* play/landmark.el (lm-human-resigns, lm):
* net/eudcb-ldap.el (eudc-ldap-check-base):
* play/mpuz.el (mpuz-offer-abort, mpuz-try-letter, mpuz-close-game):
* progmodes/ebrowse.el (ebrowse-find-pattern):
* progmodes/idlw-shell.el (idlwave-shell-set-bp-check):
* textmodes/reftex-index.el (reftex-index-initialize-phrases-buffer):
End `yes-or-no-p' and `y-or-n-p' prompts with question mark and
space.
* vc.el (vc-delete-file):
* play/gomoku.el (gomoku-terminate-game, gomoku)
(gomoku-prompt-for-move, gomoku-human-takes-back):
* play/landmark.el (lm-human-takes-back, lm-prompt-for-move)
(lm-start-robot, lm-human-plays): Remove extraneous spaces in
messages.
2005-09-24 23:26:28 +00:00
|
|
|
|
(not (y-or-n-p "Really commit? "))))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(progn (when (not win) (log-edit-hide-buf))
|
|
|
|
|
(message "Oh, well! Later maybe?"))
|
|
|
|
|
(run-hooks 'log-edit-done-hook)
|
|
|
|
|
(log-edit-hide-buf)
|
2000-12-10 21:08:55 +00:00
|
|
|
|
(unless (or log-edit-keep-buffer (not log-edit-parent-buffer))
|
|
|
|
|
(cvs-bury-buffer (current-buffer) log-edit-parent-buffer))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(call-interactively log-edit-callback))))
|
|
|
|
|
|
|
|
|
|
(defun log-edit-files ()
|
|
|
|
|
"Return the list of files that are about to be committed."
|
|
|
|
|
(ignore-errors (funcall log-edit-listfun)))
|
|
|
|
|
|
|
|
|
|
(defun log-edit-mode-help ()
|
|
|
|
|
"Provide help for the `log-edit-mode-map'."
|
|
|
|
|
(interactive)
|
|
|
|
|
(if (eq last-command 'log-edit-mode-help)
|
|
|
|
|
(describe-function major-mode)
|
2005-09-18 12:25:02 +00:00
|
|
|
|
(message "%s"
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(substitute-command-keys
|
|
|
|
|
"Type `\\[log-edit-done]' to finish commit. Try `\\[describe-function] log-edit-done' for more help."))))
|
|
|
|
|
|
2001-03-07 00:26:25 +00:00
|
|
|
|
(defcustom log-edit-common-indent 0
|
|
|
|
|
"Minimum indentation to use in `log-edit-set-common-indentation'."
|
|
|
|
|
:group 'log-edit
|
|
|
|
|
:type 'integer)
|
|
|
|
|
|
|
|
|
|
(defun log-edit-set-common-indentation ()
|
|
|
|
|
"(Un)Indent the current buffer rigidly to `log-edit-common-indent'."
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(let ((common (point-max)))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (< (point) (point-max))
|
|
|
|
|
(if (not (looking-at "^[ \t]*$"))
|
|
|
|
|
(setq common (min common (current-indentation))))
|
|
|
|
|
(forward-line 1))
|
2001-03-07 00:26:25 +00:00
|
|
|
|
(indent-rigidly (point-min) (point-max)
|
|
|
|
|
(- log-edit-common-indent common)))))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
2007-12-01 19:37:20 +00:00
|
|
|
|
(defun log-edit-show-diff ()
|
|
|
|
|
"Show the diff for the files to be committed."
|
|
|
|
|
(interactive)
|
2007-12-01 20:34:23 +00:00
|
|
|
|
(if (functionp log-edit-diff-function)
|
|
|
|
|
(funcall log-edit-diff-function)
|
|
|
|
|
(error "Diff functionality has not been setup")))
|
2007-12-01 19:37:20 +00:00
|
|
|
|
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(defun log-edit-show-files ()
|
|
|
|
|
"Show the list of files to be committed."
|
|
|
|
|
(interactive)
|
|
|
|
|
(let* ((files (log-edit-files))
|
2000-12-10 21:08:55 +00:00
|
|
|
|
(buf (get-buffer-create log-edit-files-buf)))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(with-current-buffer buf
|
|
|
|
|
(log-edit-hide-buf buf 'all)
|
|
|
|
|
(setq buffer-read-only nil)
|
|
|
|
|
(erase-buffer)
|
2000-11-06 07:01:36 +00:00
|
|
|
|
(cvs-insert-strings files)
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(setq buffer-read-only t)
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(save-selected-window
|
|
|
|
|
(cvs-pop-to-buffer-same-frame buf)
|
|
|
|
|
(shrink-window-if-larger-than-buffer)
|
|
|
|
|
(selected-window)))))
|
|
|
|
|
|
|
|
|
|
(defun log-edit-insert-cvs-template ()
|
2005-11-28 20:22:04 +00:00
|
|
|
|
"Insert the template specified by the CVS administrator, if any.
|
|
|
|
|
This simply uses the local CVS/Template file."
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(interactive)
|
2009-10-02 03:48:36 +00:00
|
|
|
|
(when (or (called-interactively-p 'interactive)
|
|
|
|
|
(= (point-min) (point-max)))
|
2005-11-28 20:22:04 +00:00
|
|
|
|
(when (file-readable-p "CVS/Template")
|
|
|
|
|
(insert-file-contents "CVS/Template"))))
|
|
|
|
|
|
|
|
|
|
(defun log-edit-insert-cvs-rcstemplate ()
|
|
|
|
|
"Insert the rcstemplate from the CVS repository.
|
|
|
|
|
This contacts the repository to get the rcstemplate file and
|
|
|
|
|
can thus take some time."
|
|
|
|
|
(interactive)
|
2009-10-02 03:48:36 +00:00
|
|
|
|
(when (or (called-interactively-p 'interactive)
|
|
|
|
|
(= (point-min) (point-max)))
|
2005-11-28 22:31:47 +00:00
|
|
|
|
(when (file-readable-p "CVS/Root")
|
|
|
|
|
;; Ignore the stderr stuff, even if it's an error.
|
|
|
|
|
(call-process "cvs" nil '(t nil) nil
|
|
|
|
|
"checkout" "-p" "CVSROOT/rcstemplate"))))
|
2003-02-04 12:29:42 +00:00
|
|
|
|
|
2005-11-28 20:22:04 +00:00
|
|
|
|
(defun log-edit-insert-filenames ()
|
|
|
|
|
"Insert the list of files that are to be committed."
|
|
|
|
|
(interactive)
|
|
|
|
|
(insert "Affected files: \n"
|
|
|
|
|
(mapconcat 'identity (log-edit-files) " \n")))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
|
|
|
|
(defun log-edit-add-to-changelog ()
|
|
|
|
|
"Insert this log message into the appropriate ChangeLog file."
|
|
|
|
|
(interactive)
|
|
|
|
|
;; Yuck!
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(unless (string= (buffer-string) (ring-ref log-edit-comment-ring 0))
|
|
|
|
|
(ring-insert log-edit-comment-ring (buffer-string)))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(dolist (f (log-edit-files))
|
|
|
|
|
(let ((buffer-file-name (expand-file-name f)))
|
|
|
|
|
(save-excursion
|
(log-edit-maximum-comment-ring-size, log-edit-comment-ring)
(log-edit-comment-ring-index, log-edit-last-comment-match): Rename vars from
vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index,
and vc-last-comment-match.
(log-edit-new-comment-index, log-edit-previous-comment)
(log-edit-next-comment, log-edit-comment-search-backward)
(log-edit-comment-search-forward, log-edit-comment-to-change-log):
Rename funs from vc-new-comment-index, vc-previous-comment,
vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward,
and vc-comment-to-change-log.
2003-05-31 16:43:30 +00:00
|
|
|
|
(log-edit-comment-to-change-log)))))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
2005-11-28 20:22:04 +00:00
|
|
|
|
(defvar log-edit-changelog-use-first nil)
|
|
|
|
|
(defun log-edit-insert-changelog (&optional use-first)
|
|
|
|
|
"Insert a log message by looking at the ChangeLog.
|
|
|
|
|
The idea is to write your ChangeLog entries first, and then use this
|
|
|
|
|
command to commit your changes.
|
|
|
|
|
|
|
|
|
|
To select default log text, we:
|
|
|
|
|
- find the ChangeLog entries for the files to be checked in,
|
|
|
|
|
- verify that the top entry in the ChangeLog is on the current date
|
|
|
|
|
and by the current user; if not, we don't provide any default text,
|
|
|
|
|
- search the ChangeLog entry for paragraphs containing the names of
|
|
|
|
|
the files we're checking in, and finally
|
|
|
|
|
- use those paragraphs as the log text.
|
|
|
|
|
|
|
|
|
|
If the optional prefix arg USE-FIRST is given (via \\[universal-argument]),
|
|
|
|
|
or if the command is repeated a second time in a row, use the first log entry
|
|
|
|
|
regardless of user name or time."
|
|
|
|
|
(interactive "P")
|
|
|
|
|
(let ((log-edit-changelog-use-first
|
|
|
|
|
(or use-first (eq last-command 'log-edit-insert-changelog))))
|
|
|
|
|
(log-edit-insert-changelog-entries (log-edit-files)))
|
|
|
|
|
(log-edit-set-common-indentation)
|
|
|
|
|
(goto-char (point-min))
|
2009-08-19 19:55:58 +00:00
|
|
|
|
(when (and log-edit-strip-single-file-name (looking-at "\\*\\s-+"))
|
2005-11-28 20:22:04 +00:00
|
|
|
|
(forward-line 1)
|
|
|
|
|
(when (not (re-search-forward "^\\*\\s-+" nil t))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(skip-chars-forward "^():")
|
|
|
|
|
(skip-chars-forward ": ")
|
|
|
|
|
(delete-region (point-min) (point)))))
|
|
|
|
|
|
2003-02-04 12:29:42 +00:00
|
|
|
|
;;;;
|
2000-03-11 03:51:31 +00:00
|
|
|
|
;;;; functions for getting commit message from ChangeLog a file...
|
|
|
|
|
;;;; Courtesy Jim Blandy
|
2003-02-04 12:29:42 +00:00
|
|
|
|
;;;;
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
2000-05-10 22:20:51 +00:00
|
|
|
|
(defun log-edit-narrow-changelog ()
|
2000-03-11 03:51:31 +00:00
|
|
|
|
"Narrow to the top page of the current buffer, a ChangeLog file.
|
|
|
|
|
Actually, the narrowed region doesn't include the date line.
|
|
|
|
|
A \"page\" in a ChangeLog file is the area between two dates."
|
|
|
|
|
(or (eq major-mode 'change-log-mode)
|
2000-05-10 22:20:51 +00:00
|
|
|
|
(error "log-edit-narrow-changelog: current buffer isn't a ChangeLog"))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
|
|
|
|
|
;; Skip date line and subsequent blank lines.
|
|
|
|
|
(forward-line 1)
|
|
|
|
|
(if (looking-at "[ \t\n]*\n")
|
|
|
|
|
(goto-char (match-end 0)))
|
|
|
|
|
|
|
|
|
|
(let ((start (point)))
|
|
|
|
|
(forward-page 1)
|
|
|
|
|
(narrow-to-region start (point))
|
|
|
|
|
(goto-char (point-min))))
|
|
|
|
|
|
2000-05-10 22:20:51 +00:00
|
|
|
|
(defun log-edit-changelog-paragraph ()
|
2000-03-11 03:51:31 +00:00
|
|
|
|
"Return the bounds of the ChangeLog paragraph containing point.
|
|
|
|
|
If we are between paragraphs, return the previous paragraph."
|
2009-09-25 17:57:09 +00:00
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(if (looking-at "^[ \t]*$")
|
|
|
|
|
(skip-chars-backward " \t\n" (point-min)))
|
|
|
|
|
(list (progn
|
|
|
|
|
(if (re-search-backward "^[ \t]*\n" nil 'or-to-limit)
|
|
|
|
|
(goto-char (match-end 0)))
|
|
|
|
|
(point))
|
|
|
|
|
(if (re-search-forward "^[ \t\n]*$" nil t)
|
|
|
|
|
(match-beginning 0)
|
|
|
|
|
(point-max))))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
2000-05-10 22:20:51 +00:00
|
|
|
|
(defun log-edit-changelog-subparagraph ()
|
2000-03-11 03:51:31 +00:00
|
|
|
|
"Return the bounds of the ChangeLog subparagraph containing point.
|
|
|
|
|
A subparagraph is a block of non-blank lines beginning with an asterisk.
|
|
|
|
|
If we are between sub-paragraphs, return the previous subparagraph."
|
|
|
|
|
(end-of-line)
|
|
|
|
|
(if (search-backward "*" nil t)
|
|
|
|
|
(list (progn (beginning-of-line) (point))
|
2000-10-24 11:27:41 +00:00
|
|
|
|
(progn
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(forward-line 1)
|
|
|
|
|
(if (re-search-forward "^[ \t]*[\n*]" nil t)
|
|
|
|
|
(match-beginning 0)
|
|
|
|
|
(point-max))))
|
2009-09-25 17:57:09 +00:00
|
|
|
|
(list (point) (point))))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
2000-05-10 22:20:51 +00:00
|
|
|
|
(defun log-edit-changelog-entry ()
|
2000-03-11 03:51:31 +00:00
|
|
|
|
"Return the bounds of the ChangeLog entry containing point.
|
2000-05-10 22:20:51 +00:00
|
|
|
|
The variable `log-edit-changelog-full-paragraphs' decides whether an
|
2000-03-11 03:51:31 +00:00
|
|
|
|
\"entry\" is a paragraph or a subparagraph; see its documentation string
|
|
|
|
|
for more details."
|
2009-09-25 17:57:09 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(if log-edit-changelog-full-paragraphs
|
|
|
|
|
(log-edit-changelog-paragraph)
|
|
|
|
|
(log-edit-changelog-subparagraph))))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
|
|
|
|
(defvar user-full-name)
|
|
|
|
|
(defvar user-mail-address)
|
2000-05-10 22:20:51 +00:00
|
|
|
|
(defun log-edit-changelog-ours-p ()
|
2000-03-11 03:51:31 +00:00
|
|
|
|
"See if ChangeLog entry at point is for the current user, today.
|
2007-08-08 07:40:09 +00:00
|
|
|
|
Return non-nil if it is."
|
2000-03-11 03:51:31 +00:00
|
|
|
|
;; Code adapted from add-change-log-entry.
|
|
|
|
|
(let ((name (or (and (boundp 'add-log-full-name) add-log-full-name)
|
|
|
|
|
(and (fboundp 'user-full-name) (user-full-name))
|
|
|
|
|
(and (boundp 'user-full-name) user-full-name)))
|
|
|
|
|
(mail (or (and (boundp 'add-log-mailing-address) add-log-mailing-address)
|
|
|
|
|
;;(and (fboundp 'user-mail-address) (user-mail-address))
|
|
|
|
|
(and (boundp 'user-mail-address) user-mail-address)))
|
|
|
|
|
(time (or (and (boundp 'add-log-time-format)
|
|
|
|
|
(functionp add-log-time-format)
|
|
|
|
|
(funcall add-log-time-format))
|
|
|
|
|
(format-time-string "%Y-%m-%d"))))
|
2005-11-28 20:22:04 +00:00
|
|
|
|
(looking-at (if log-edit-changelog-use-first
|
|
|
|
|
"[^ \t]"
|
|
|
|
|
(regexp-quote (format "%s %s <%s>" time name mail))))))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
2000-05-10 22:20:51 +00:00
|
|
|
|
(defun log-edit-changelog-entries (file)
|
2000-03-11 03:51:31 +00:00
|
|
|
|
"Return the ChangeLog entries for FILE, and the ChangeLog they came from.
|
|
|
|
|
The return value looks like this:
|
|
|
|
|
(LOGBUFFER (ENTRYSTART . ENTRYEND) ...)
|
|
|
|
|
where LOGBUFFER is the name of the ChangeLog buffer, and each
|
|
|
|
|
\(ENTRYSTART . ENTRYEND\) pair is a buffer region."
|
2007-06-26 16:40:26 +00:00
|
|
|
|
(let ((changelog-file-name
|
|
|
|
|
(let ((default-directory
|
|
|
|
|
(file-name-directory (expand-file-name file)))
|
|
|
|
|
(visiting-buffer (find-buffer-visiting file)))
|
|
|
|
|
;; If there is a buffer visiting FILE, and it has a local
|
|
|
|
|
;; value for `change-log-default-name', use that.
|
|
|
|
|
(if (and visiting-buffer
|
|
|
|
|
(local-variable-p 'change-log-default-name
|
|
|
|
|
visiting-buffer))
|
|
|
|
|
(with-current-buffer visiting-buffer
|
|
|
|
|
change-log-default-name)
|
|
|
|
|
;; `find-change-log' uses `change-log-default-name' if set
|
|
|
|
|
;; and sets it before exiting, so we need to work around
|
|
|
|
|
;; that memoizing which is undesired here
|
|
|
|
|
(setq change-log-default-name nil)
|
|
|
|
|
(find-change-log)))))
|
|
|
|
|
(with-current-buffer (find-file-noselect changelog-file-name)
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(unless (eq major-mode 'change-log-mode) (change-log-mode))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(if (looking-at "\\s-*\n") (goto-char (match-end 0)))
|
2000-05-10 22:20:51 +00:00
|
|
|
|
(if (not (log-edit-changelog-ours-p))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(list (current-buffer))
|
|
|
|
|
(save-restriction
|
2000-05-10 22:20:51 +00:00
|
|
|
|
(log-edit-narrow-changelog)
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(goto-char (point-min))
|
2003-02-04 12:29:42 +00:00
|
|
|
|
|
2000-03-11 03:51:31 +00:00
|
|
|
|
;; Search for the name of FILE relative to the ChangeLog. If that
|
|
|
|
|
;; doesn't occur anywhere, they're not using full relative
|
|
|
|
|
;; filenames in the ChangeLog, so just look for FILE; we'll accept
|
|
|
|
|
;; some false positives.
|
|
|
|
|
(let ((pattern (file-relative-name
|
|
|
|
|
file (file-name-directory changelog-file-name))))
|
|
|
|
|
(if (or (string= pattern "")
|
|
|
|
|
(not (save-excursion
|
|
|
|
|
(search-forward pattern nil t))))
|
|
|
|
|
(setq pattern (file-name-nondirectory file)))
|
|
|
|
|
|
2005-05-25 21:29:56 +00:00
|
|
|
|
(setq pattern (concat "\\(^\\|[^[:alnum:]]\\)"
|
|
|
|
|
pattern
|
|
|
|
|
"\\($\\|[^[:alnum:]]\\)"))
|
|
|
|
|
|
2009-09-25 17:57:09 +00:00
|
|
|
|
(let (texts
|
|
|
|
|
(pos (point)))
|
|
|
|
|
(while (and (not (eobp)) (re-search-forward pattern nil t))
|
2000-05-10 22:20:51 +00:00
|
|
|
|
(let ((entry (log-edit-changelog-entry)))
|
2009-09-25 17:57:09 +00:00
|
|
|
|
(if (< (elt entry 1) (max (1+ pos) (point)))
|
|
|
|
|
;; This is not relevant, actually.
|
|
|
|
|
nil
|
|
|
|
|
(push entry texts))
|
|
|
|
|
;; Make sure we make progress.
|
|
|
|
|
(setq pos (max (1+ pos) (elt entry 1)))
|
|
|
|
|
(goto-char pos)))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
|
|
|
|
|
(cons (current-buffer) texts))))))))
|
|
|
|
|
|
2000-05-10 22:20:51 +00:00
|
|
|
|
(defun log-edit-changelog-insert-entries (buffer regions)
|
2000-03-11 03:51:31 +00:00
|
|
|
|
"Insert those regions in BUFFER specified in REGIONS.
|
|
|
|
|
Sort REGIONS front-to-back first."
|
|
|
|
|
(let ((regions (sort regions 'car-less-than-car))
|
|
|
|
|
(last))
|
|
|
|
|
(dolist (region regions)
|
|
|
|
|
(when (and last (< last (car region))) (newline))
|
|
|
|
|
(setq last (elt region 1))
|
|
|
|
|
(apply 'insert-buffer-substring buffer region))))
|
|
|
|
|
|
2000-05-10 22:20:51 +00:00
|
|
|
|
(defun log-edit-insert-changelog-entries (files)
|
2000-03-11 03:51:31 +00:00
|
|
|
|
"Given a list of files FILES, insert the ChangeLog entries for them."
|
|
|
|
|
(let ((buffer-entries nil))
|
|
|
|
|
|
|
|
|
|
;; Add each buffer to buffer-entries, and associate it with the list
|
|
|
|
|
;; of entries we want from that file.
|
|
|
|
|
(dolist (file files)
|
2000-05-10 22:20:51 +00:00
|
|
|
|
(let* ((entries (log-edit-changelog-entries file))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(pair (assq (car entries) buffer-entries)))
|
|
|
|
|
(if pair
|
|
|
|
|
(setcdr pair (cvs-union (cdr pair) (cdr entries)))
|
|
|
|
|
(push entries buffer-entries))))
|
|
|
|
|
|
|
|
|
|
;; Now map over each buffer in buffer-entries, sort the entries for
|
|
|
|
|
;; each buffer, and extract them as strings.
|
|
|
|
|
(dolist (buffer-entry buffer-entries)
|
2000-05-10 22:20:51 +00:00
|
|
|
|
(log-edit-changelog-insert-entries (car buffer-entry) (cdr buffer-entry))
|
2000-03-11 03:51:31 +00:00
|
|
|
|
(when (cdr buffer-entry) (newline)))))
|
|
|
|
|
|
|
|
|
|
(provide 'log-edit)
|
2000-03-26 21:19:58 +00:00
|
|
|
|
|
2005-05-25 21:29:56 +00:00
|
|
|
|
;; arch-tag: 8089b39c-983b-4e83-93cd-ed0a64c7fdcc
|
2000-03-11 03:51:31 +00:00
|
|
|
|
;;; log-edit.el ends here
|