comparison lisp/packages/add-log.el @ 120:cca96a509cfe r20-1b12

Import from CVS: tag r20-1b12
author cvs
date Mon, 13 Aug 2007 09:25:29 +0200
parents 8619ce7e4c50
children 59463afc5666
comparison
equal deleted inserted replaced
119:d101af7320b8 120:cca96a509cfe
27 27
28 ;; This facility is documented in the Emacs Manual. 28 ;; This facility is documented in the Emacs Manual.
29 29
30 ;;; Code: 30 ;;; Code:
31 31
32 ;;;###autoload 32 (defgroup change-log nil
33 (defvar change-log-default-name nil 33 "Change log maintenance"
34 "*Name of a change log file for \\[add-change-log-entry].") 34 :group 'tools
35 35 :prefix "change-log-"
36 ;;;###autoload 36 :prefix "add-log-")
37 (defvar add-log-current-defun-function nil 37
38
39 ;;;###autoload
40 (defcustom change-log-default-name nil
41 "*Name of a change log file for \\[add-change-log-entry]."
42 :type '(choice (const :tag "default" nil)
43 string)
44 :group 'change-log)
45
46 ;;;###autoload
47 (defcustom add-log-current-defun-function nil
38 "\ 48 "\
39 *If non-nil, function to guess name of current function from surrounding text. 49 *If non-nil, function to guess name of current function from surrounding text.
40 \\[add-change-log-entry] calls this function (if nil, `add-log-current-defun' 50 \\[add-change-log-entry] calls this function (if nil, `add-log-current-defun'
41 instead) with no arguments. It returns a string or nil if it cannot guess.") 51 instead) with no arguments. It returns a string or nil if it cannot guess."
42 52 :type 'boolean
43 ;;;###autoload 53 :group 'change-log)
44 (defvar add-log-full-name nil 54
55 ;;;###autoload
56 (defcustom add-log-full-name nil
45 "*Full name of user, for inclusion in ChangeLog daily headers. 57 "*Full name of user, for inclusion in ChangeLog daily headers.
46 This defaults to the value returned by the `user-full-name' function.") 58 This defaults to the value returned by the `user-full-name' function."
59 :type '(choice (const :tag "Default" nil)
60 string)
61 :group 'change-log)
47 62
48 ;; So that the dump-time value doesn't go into loaddefs.el with the autoload. 63 ;; So that the dump-time value doesn't go into loaddefs.el with the autoload.
49 (or add-log-full-name (setq add-log-full-name (user-full-name))) 64 (or add-log-full-name (setq add-log-full-name (user-full-name)))
50 65
51 ;;;###autoload 66 ;;;###autoload
52 (defvar add-log-mailing-address nil 67 (defcustom add-log-mailing-address nil
53 "*Electronic mail address of user, for inclusion in ChangeLog daily headers. 68 "*Electronic mail address of user, for inclusion in ChangeLog daily headers.
54 This defaults to the value of `user-mail-address'.") 69 This defaults to the value of `user-mail-address'."
70 :type '(choice (const :tag "Default" nil)
71 string)
72 :group 'change-log)
55 73
56 ;; So that the dump-time value doesn't go into loaddefs.el with the autoload. 74 ;; So that the dump-time value doesn't go into loaddefs.el with the autoload.
57 (or add-log-mailing-address 75 (or add-log-mailing-address
58 (setq add-log-mailing-address (user-mail-address))) 76 (setq add-log-mailing-address (user-mail-address)))
59 77
331 (let ((end (save-excursion (forward-paragraph) (point))) 349 (let ((end (save-excursion (forward-paragraph) (point)))
332 (beg (save-excursion (backward-paragraph)(point))) 350 (beg (save-excursion (backward-paragraph)(point)))
333 (paragraph-start (concat paragraph-start "\\|\\s *\\s("))) 351 (paragraph-start (concat paragraph-start "\\|\\s *\\s(")))
334 (fill-region beg end justify))) 352 (fill-region beg end justify)))
335 353
336 (defvar add-log-current-defun-header-regexp 354 (defcustom add-log-current-defun-header-regexp
337 "^\\([A-Z][A-Z_ ]*[A-Z_]\\|[-_a-zA-Z]+\\)[ \t]*[:=]" 355 "^\\([A-Z][A-Z_ ]*[A-Z_]\\|[-_a-zA-Z]+\\)[ \t]*[:=]"
338 "*Heuristic regexp used by `add-log-current-defun' for unknown major modes.") 356 "*Heuristic regexp used by `add-log-current-defun' for unknown major modes."
357 :type 'regexp
358 :group 'change-log)
339 359
340 ;;;###autoload 360 ;;;###autoload
341 (defun add-log-current-defun () 361 (defun add-log-current-defun ()
342 "Return name of function definition point is in, or nil. 362 "Return name of function definition point is in, or nil.
343 363