;;; pcvs.el --- a front-end to CVS
;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-;; 2000, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: (The PCL-CVS Trust) pcl-cvs@cyclic.com
;; (Per Cederqvist) ceder@lysator.liu.se
(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
'(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--------------------- "
;; into a sequence of chars.
(decode-coding-inserted-region
(point-min) (point-max) file t nil nil t)
+ ;; Set buffer-file-coding-system.
+ (after-insert-file-set-coding (buffer-size) t)
(set-buffer-modified-p nil)
(let ((buffer-file-name (expand-file-name file)))
(after-find-file))
(interactive "DNew repository: ")
(if (or (file-directory-p (expand-file-name "CVSROOT" newroot))
(y-or-n-p (concat "Warning: no CVSROOT found inside repository."
- " Change cvs-cvsroot anyhow?")))
+ " Change cvs-cvsroot anyhow? ")))
(setq cvs-cvsroot newroot)))
;;;;