aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/pcvs.el
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2006-10-02 00:21:07 +0000
committerStefan Monnier <[email protected]>2006-10-02 00:21:07 +0000
commit04e408d9e2f1a527a9b15e0fb29be4a8740837dc (patch)
tree0d5c36724a694549ba12066ea58b60b405289baf /lisp/pcvs.el
parentb6357463235b6b4226f1f8e8675796e94b4b5d6b (diff)
(cvs-update-header): Fix handling of extra newlines so that
they don't keep accumulating.
Diffstat (limited to 'lisp/pcvs.el')
-rw-r--r--lisp/pcvs.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/pcvs.el b/lisp/pcvs.el
index a9105227bf..1f2bad13dc 100644
--- a/lisp/pcvs.el
+++ b/lisp/pcvs.el
@@ -618,7 +618,6 @@ If non-nil, NEW means to create a new buffer no matter what."
(str (car hf))
(done "")
(tin (ewoc-nth cvs-cookies 0)))
- (if (eq (length str) 2) (setq str ""))
;; look for the first *real* fileinfo (to determine emptyness)
(while
(and tin
@@ -626,14 +625,17 @@ If non-nil, NEW means to create a new buffer no matter what."
'(MESSAGE DIRCHANGE)))
(setq tin (ewoc-next cvs-cookies tin)))
(if add
- (setq str (concat "-- Running " cmd " ...\n" str))
+ (progn
+ ;; Remove the default empty line, if applicable.
+ (if (not (string-match "." str)) (setq str "\n"))
+ (setq str (concat "-- Running " cmd " ...\n" str)))
(if (not (string-match
(concat "^-- Running " (regexp-quote cmd) " \\.\\.\\.\n") str))
(error "Internal PCL-CVS error while removing message")
(setq str (replace-match "" t t str))
- (if (zerop (length str)) (setq str "\n"))
- (setq done (concat "-- last cmd: " cmd " --"))))
- (setq str (concat str "\n") done (concat done "\n"))
+ ;; Re-add the default empty line, if applicable.
+ (if (not (string-match "." str)) (setq str "\n\n"))
+ (setq done (concat "-- last cmd: " cmd " --\n"))))
;; set the new header and footer
(ewoc-set-hf cvs-cookies
str (concat "\n--------------------- "