comparison lisp/log-edit.el @ 32816:f4923452ea45

(log-edit): Add :version and a :group for vc.
author Dave Love <fx@gnu.org>
date Tue, 24 Oct 2000 11:27:41 +0000
parents 8a911c182035
children 3cbd3cc4cc8b
comparison
equal deleted inserted replaced
32815:2359a616d429 32816:f4923452ea45
3 ;; Copyright (C) 1999-2000 Free Software Foundation, Inc. 3 ;; Copyright (C) 1999-2000 Free Software Foundation, Inc.
4 4
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.6 2000/06/02 02:28:39 monnier Exp $ 8 ;; Revision: $Id: log-edit.el,v 1.7 2000/06/02 23:03:31 monnier Exp $
9 9
10 ;; This file is part of GNU Emacs. 10 ;; This file is part of GNU Emacs.
11 11
12 ;; GNU Emacs is free software; you can redistribute it and/or modify 12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by 13 ;; it under the terms of the GNU General Public License as published by
42 ;;;; 42 ;;;;
43 ;;;; Global Variables 43 ;;;; Global Variables
44 ;;;; 44 ;;;;
45 45
46 (defgroup log-edit nil 46 (defgroup log-edit nil
47 "Major mode for editing commit messages for PCL-CVS." 47 "Major mode for editing RCS and CVS commit messages."
48 :group 'pcl-cvs 48 :group 'pcl-cvs
49 :group 'vc ; It's used by VC.
50 :version "21.1"
49 :prefix "log-edit-") 51 :prefix "log-edit-")
50 52
51 ;; compiler pacifiers 53 ;; compiler pacifiers
52 (defvar cvs-buffer) 54 (defvar cvs-buffer)
53 55
356 If we are between sub-paragraphs, return the previous subparagraph." 358 If we are between sub-paragraphs, return the previous subparagraph."
357 (save-excursion 359 (save-excursion
358 (end-of-line) 360 (end-of-line)
359 (if (search-backward "*" nil t) 361 (if (search-backward "*" nil t)
360 (list (progn (beginning-of-line) (point)) 362 (list (progn (beginning-of-line) (point))
361 (progn 363 (progn
362 (forward-line 1) 364 (forward-line 1)
363 (if (re-search-forward "^[ \t]*[\n*]" nil t) 365 (if (re-search-forward "^[ \t]*[\n*]" nil t)
364 (match-beginning 0) 366 (match-beginning 0)
365 (point-max)))) 367 (point-max))))
366 (list (point) (point))))) 368 (list (point) (point)))))
397 The return value looks like this: 399 The return value looks like this:
398 (LOGBUFFER (ENTRYSTART . ENTRYEND) ...) 400 (LOGBUFFER (ENTRYSTART . ENTRYEND) ...)
399 where LOGBUFFER is the name of the ChangeLog buffer, and each 401 where LOGBUFFER is the name of the ChangeLog buffer, and each
400 \(ENTRYSTART . ENTRYEND\) pair is a buffer region." 402 \(ENTRYSTART . ENTRYEND\) pair is a buffer region."
401 (save-excursion 403 (save-excursion
402 (let ((changelog-file-name 404 (let ((changelog-file-name
403 (let ((default-directory 405 (let ((default-directory
404 (file-name-directory (expand-file-name file)))) 406 (file-name-directory (expand-file-name file))))
405 ;; `find-change-log' uses `change-log-default-name' if set 407 ;; `find-change-log' uses `change-log-default-name' if set
406 ;; and sets it before exiting, so we need to work around 408 ;; and sets it before exiting, so we need to work around
407 ;; that memoizing which is undesired here 409 ;; that memoizing which is undesired here