/[emacs]/emacs/lisp/add-log.el
ViewVC logotype

Diff of /emacs/lisp/add-log.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.137 by eliz, Sun May 12 17:28:42 2002 UTC revision 1.138 by walters, Mon May 13 05:47:29 2002 UTC
# Line 67  This defaults to the value returned by t Line 67  This defaults to the value returned by t
67    
68  ;;;###autoload  ;;;###autoload
69  (defcustom add-log-mailing-address nil  (defcustom add-log-mailing-address nil
70    "*Electronic mail address of user, for inclusion in ChangeLog daily headers.    "*Electronic mail addresses of user, for inclusion in ChangeLog headers.
71  This defaults to the value of `user-mail-address'."  This defaults to the value of `user-mail-address'.  In addition to
72    being a simple string, this value can also be a list.  All elements
73    will be recognized as referring to the same user; when creating a new
74    ChangeLog entry, one element will be chosen at random."
75    :type '(choice (const :tag "Default" nil)    :type '(choice (const :tag "Default" nil)
76                   string)                   (repeat string))
77    :group 'change-log)    :group 'change-log)
78    
79  (defcustom add-log-time-format 'add-log-iso8601-time-string  (defcustom add-log-time-format 'add-log-iso8601-time-string
# Line 476  non-nil, otherwise in local time." Line 479  non-nil, otherwise in local time."
479        (skip-chars-forward "\n"))        (skip-chars-forward "\n"))
480    
481      ;; Advance into first entry if it is usable; else make new one.      ;; Advance into first entry if it is usable; else make new one.
482      (let ((new-entry (concat (funcall add-log-time-format)      (let ((new-entries (mapcar (lambda (addr)
483                               "  " add-log-full-name                                   (concat (funcall add-log-time-format)
484                               "  <" add-log-mailing-address ">")))                                           "  " add-log-full-name
485                                             "  <" addr ">"))
486                                   (if (consp add-log-mailing-address)
487                                       add-log-mailing-address
488                                     (list add-log-mailing-address)))))
489        (if (and (not add-log-always-start-new-record)        (if (and (not add-log-always-start-new-record)
490                 (looking-at (regexp-quote new-entry)))                 (let ((hit nil))
491                     (dolist (entry new-entries hit)
492                       (when (looking-at (regexp-quote entry))
493                         (setq hit t)))))
494            (forward-line 1)            (forward-line 1)
495          (insert new-entry "\n\n")          (insert (nth (random (length new-entries))
496                         new-entries)
497                    "\n\n")
498          (forward-line -1)))          (forward-line -1)))
499    
500      ;; Determine where we should stop searching for a usable      ;; Determine where we should stop searching for a usable

Legend:
Removed from v.1.137  
changed lines
  Added in v.1.138

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26