From 04e408d9e2f1a527a9b15e0fb29be4a8740837dc Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 2 Oct 2006 00:21:07 +0000 Subject: [PATCH] (cvs-update-header): Fix handling of extra newlines so that they don't keep accumulating. --- lisp/ChangeLog | 20 ++++++++++++-------- lisp/pcvs.el | 12 +++++++----- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fa1a28ce307..ac87a20cbc1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,8 +1,12 @@ +2006-10-01 Stefan Monnier + + * pcvs.el (cvs-update-header): Fix handling of extra newlines so that + they don't keep accumulating. + 2006-10-01 Bob Rogers (tiny change) * ffap.el (ffap-rfc-path): Change the address of the RFC - repository to ftp.rfc-editor.org, as ds.internic.net seems to be - gone. + repository to ftp.rfc-editor.org, as ds.internic.net seems to be gone. 2006-10-01 Stephen Berman @@ -38,7 +42,7 @@ 2006-09-30 Martin Rudalics - * files.el (find-file-existing): Modified to not allow wildcards. + * files.el (find-file-existing): Modify to not allow wildcards. 2006-09-30 Johan Bockg,Ae(Brd @@ -47,15 +51,15 @@ 2006-09-30 Michael Welsh Duggan - * progmodes/sh-script.el (sh-prev-thing): Take - `sh-leading-keywords' into account. + * progmodes/sh-script.el (sh-prev-thing): + Take `sh-leading-keywords' into account. 2006-09-29 Glenn Morris * custom.el (defcustom): Doc fix. - * calendar/calendar.el (european-calendar-style): Call - european-calendar or american-calendar as needed when set. + * calendar/calendar.el (european-calendar-style): + Call european-calendar or american-calendar as needed when set. (diary-view-entries, list-calendar-holidays): Move autoloads before use. @@ -82,7 +86,7 @@ 2006-09-29 Carsten Dominik * textmodes/org.el (org-file-remote-p): Get regexp from list. - (org-archive-subtree): remove erraneous `]' from character list. + (org-archive-subtree): Remove erraneous `]' from character list. 2006-09-28 Jonathan Yavner diff --git a/lisp/pcvs.el b/lisp/pcvs.el index a9105227bfd..1f2bad13dcd 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--------------------- " -- 2.39.2