38 |
(require 'ring) |
(require 'ring) |
39 |
(require 'vc) |
(require 'vc) |
40 |
|
|
41 |
;;;; |
;;;; |
42 |
;;;; Global Variables |
;;;; Global Variables |
43 |
;;;; |
;;;; |
44 |
|
|
45 |
(defgroup log-edit nil |
(defgroup log-edit nil |
46 |
"Major mode for editing RCS and CVS commit messages." |
"Major mode for editing RCS and CVS commit messages." |
91 |
:group 'log-edit |
:group 'log-edit |
92 |
:type 'boolean) |
:type 'boolean) |
93 |
|
|
94 |
(defvar cvs-commit-buffer-require-final-newline t |
(defvar cvs-commit-buffer-require-final-newline t) |
95 |
"Obsolete, use `log-edit-require-final-newline'.") |
(make-obsolete-variable 'cvs-commit-buffer-require-final-newline |
96 |
|
'log-edit-require-final-newline) |
97 |
|
|
98 |
(defcustom log-edit-require-final-newline |
(defcustom log-edit-require-final-newline |
99 |
cvs-commit-buffer-require-final-newline |
cvs-commit-buffer-require-final-newline |
130 |
:type '(hook :options (log-edit-set-common-indentation |
:type '(hook :options (log-edit-set-common-indentation |
131 |
log-edit-add-to-changelog))) |
log-edit-add-to-changelog))) |
132 |
|
|
133 |
(defvar cvs-changelog-full-paragraphs t |
(defvar cvs-changelog-full-paragraphs t) |
134 |
"Obsolete, use `log-edit-changelog-full-paragraphs'.") |
(make-obsolete-variable 'cvs-changelog-full-paragraphs |
135 |
|
'log-edit-changelog-full-paragraphs) |
136 |
|
|
137 |
(defvar log-edit-changelog-full-paragraphs cvs-changelog-full-paragraphs |
(defvar log-edit-changelog-full-paragraphs cvs-changelog-full-paragraphs |
138 |
"*If non-nil, include full ChangeLog paragraphs in the log. |
"*If non-nil, include full ChangeLog paragraphs in the log. |
330 |
(interactive) |
(interactive) |
331 |
(when (file-readable-p "CVS/Template") |
(when (file-readable-p "CVS/Template") |
332 |
(insert-file-contents "CVS/Template"))) |
(insert-file-contents "CVS/Template"))) |
333 |
|
|
334 |
|
|
335 |
(defun log-edit-add-to-changelog () |
(defun log-edit-add-to-changelog () |
336 |
"Insert this log message into the appropriate ChangeLog file." |
"Insert this log message into the appropriate ChangeLog file." |
343 |
(save-excursion |
(save-excursion |
344 |
(vc-comment-to-change-log))))) |
(vc-comment-to-change-log))))) |
345 |
|
|
346 |
;;;; |
;;;; |
347 |
;;;; functions for getting commit message from ChangeLog a file... |
;;;; functions for getting commit message from ChangeLog a file... |
348 |
;;;; Courtesy Jim Blandy |
;;;; Courtesy Jim Blandy |
349 |
;;;; |
;;;; |
350 |
|
|
351 |
(defun log-edit-narrow-changelog () |
(defun log-edit-narrow-changelog () |
352 |
"Narrow to the top page of the current buffer, a ChangeLog file. |
"Narrow to the top page of the current buffer, a ChangeLog file. |
448 |
(save-restriction |
(save-restriction |
449 |
(log-edit-narrow-changelog) |
(log-edit-narrow-changelog) |
450 |
(goto-char (point-min)) |
(goto-char (point-min)) |
451 |
|
|
452 |
;; Search for the name of FILE relative to the ChangeLog. If that |
;; Search for the name of FILE relative to the ChangeLog. If that |
453 |
;; doesn't occur anywhere, they're not using full relative |
;; doesn't occur anywhere, they're not using full relative |
454 |
;; filenames in the ChangeLog, so just look for FILE; we'll accept |
;; filenames in the ChangeLog, so just look for FILE; we'll accept |