]> git.eshelyaron.com Git - emacs.git/commitdiff
* add-log.el (add-change-log-entry): Add new arg to force each new
authorDan Nicolaescu <dann@ics.uci.edu>
Tue, 24 Jun 2008 04:04:48 +0000 (04:04 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Tue, 24 Jun 2008 04:04:48 +0000 (04:04 +0000)
entry to be on a new line.
* diff-mode.el (diff-add-change-log-entries-other-window): Use it.

lisp/ChangeLog
lisp/add-log.el
lisp/diff-mode.el

index 49a997095dfb2cd545b1d60482658fe36a3ba147..4d40fb44666e8acb7b8ce2eb54ee760073253005 100644 (file)
@@ -1,5 +1,9 @@
 2008-06-24  Dan Nicolaescu  <dann@ics.uci.edu>
 
+       * add-log.el (add-change-log-entry): Add new arg to force each new
+       entry to be on a new line.
+       * diff-mode.el (diff-add-change-log-entries-other-window): Use it.
+
        * vc-dir.el (vc-client-object): Remove.
        (vc-dir-prepare-status-buffer): Take a backend as an argument and
        use it when looking for a buffer.
 
        * vc.el (Todo): Update.
 
-       * vc-hg.el (vc-annotate-convert-time, vc-default-status-printer): 
-       * vc-rcs.el (vc-annotate-convert-time): 
-       * vc-mtn.el (vc-annotate-convert-time): 
-       * vc-git.el (vc-annotate-convert-time): 
-       * vc-cvs.el (vc-annotate-convert-time): 
+       * vc-hg.el (vc-annotate-convert-time, vc-default-status-printer):
+       * vc-rcs.el (vc-annotate-convert-time):
+       * vc-mtn.el (vc-annotate-convert-time):
+       * vc-git.el (vc-annotate-convert-time):
+       * vc-cvs.el (vc-annotate-convert-time):
        * vc-bzr.el (vc-annotate-convert-time): Declare as functions.
 
 2008-06-23  Dan Nicolaescu  <dann@ics.uci.edu>
index 1130347b918ce33f73562109954367260e43112d..fc8224293ca9139347c5964faba7237e259ae164 100644 (file)
@@ -518,7 +518,8 @@ Optional arg BUFFER-FILE overrides `buffer-file-name'."
        buffer-file))))
 
 ;;;###autoload
-(defun add-change-log-entry (&optional whoami file-name other-window new-entry)
+(defun add-change-log-entry (&optional whoami file-name other-window new-entry
+                                      put-new-entry-on-new-line)
   "Find change log file, and add an entry for today and an item for this file.
 Optional arg WHOAMI (interactive prefix) non-nil means prompt for user
 name and email (stored in `add-log-full-name' and `add-log-mailing-address').
@@ -532,6 +533,10 @@ Fourth arg NEW-ENTRY non-nil means always create a new entry at the front;
 never append to an existing entry.  Option `add-log-keep-changes-together'
 otherwise affects whether a new entry is created.
 
+Fifth arg PUT-NEW-ENTRY-ON-NEW-LINE non-nil means that if a new
+entry is created, put it on a new line by itself, do not put it
+after a comma on an existing line.
+
 Option `add-log-always-start-new-record' non-nil means always create a
 new record, even when the last record was made on the same date and by
 the same person.
@@ -679,7 +684,8 @@ non-nil, otherwise in local time."
       (let ((pos (point-marker)))
        (skip-syntax-backward " ")
        (skip-chars-backward "):")
-       (if (and (looking-at "):")
+       (if (and (not put-new-entry-on-new-line)
+                (looking-at "):")
                 (let ((pos (save-excursion (backward-sexp 1) (point))))
                   (when (equal (buffer-substring pos (point)) defun)
                     (delete-region pos (point)))
@@ -687,8 +693,8 @@ non-nil, otherwise in local time."
            (progn (skip-chars-backward ", ")
                   (delete-region (point) pos)
                   (unless (memq (char-before) '(?\()) (insert ", ")))
-         (if (looking-at "):")
-             (delete-region (+ 1 (point)) (line-end-position)))
+         (when (and (not put-new-entry-on-new-line) (looking-at "):"))
+           (delete-region (+ 1 (point)) (line-end-position)))
          (goto-char pos)
          (insert "("))
        (set-marker pos nil))
index 447a844625024d641e1d258d5ac5a0abf61765c6..864d74b4e3012526e34bfb3729a0485b83e5603f 100644 (file)
@@ -1875,7 +1875,7 @@ I.e. like `add-change-log-entry-other-window' but applied to all hunks."
                             "\\( .*\n\\)*[+]\\)?")
                     nil t))
             (save-excursion
-              (add-change-log-entry nil nil t t)))
+              (add-change-log-entry nil nil t nil t)))
         ;; When there's no more hunks, diff-hunk-next signals an error.
        (error nil)))))