Mercurial > emacs
comparison lisp/pcvs.el @ 90609:bb0e318b7c53
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 447-459)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 141-144)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-115
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 03 Oct 2006 05:04:21 +0000 |
parents | 7f3f771c85fa 7e220566994b |
children | dbe3f29e61d6 |
comparison
equal
deleted
inserted
replaced
90608:1bc627bac080 | 90609:bb0e318b7c53 |
---|---|
616 (defun cvs-update-header (cmd add) | 616 (defun cvs-update-header (cmd add) |
617 (let* ((hf (ewoc-get-hf cvs-cookies)) | 617 (let* ((hf (ewoc-get-hf cvs-cookies)) |
618 (str (car hf)) | 618 (str (car hf)) |
619 (done "") | 619 (done "") |
620 (tin (ewoc-nth cvs-cookies 0))) | 620 (tin (ewoc-nth cvs-cookies 0))) |
621 (if (eq (length str) 2) (setq str "")) | |
622 ;; look for the first *real* fileinfo (to determine emptyness) | 621 ;; look for the first *real* fileinfo (to determine emptyness) |
623 (while | 622 (while |
624 (and tin | 623 (and tin |
625 (memq (cvs-fileinfo->type (ewoc-data tin)) | 624 (memq (cvs-fileinfo->type (ewoc-data tin)) |
626 '(MESSAGE DIRCHANGE))) | 625 '(MESSAGE DIRCHANGE))) |
627 (setq tin (ewoc-next cvs-cookies tin))) | 626 (setq tin (ewoc-next cvs-cookies tin))) |
628 (if add | 627 (if add |
629 (setq str (concat "-- Running " cmd " ...\n" str)) | 628 (progn |
629 ;; Remove the default empty line, if applicable. | |
630 (if (not (string-match "." str)) (setq str "\n")) | |
631 (setq str (concat "-- Running " cmd " ...\n" str))) | |
630 (if (not (string-match | 632 (if (not (string-match |
631 (concat "^-- Running " (regexp-quote cmd) " \\.\\.\\.\n") str)) | 633 (concat "^-- Running " (regexp-quote cmd) " \\.\\.\\.\n") str)) |
632 (error "Internal PCL-CVS error while removing message") | 634 (error "Internal PCL-CVS error while removing message") |
633 (setq str (replace-match "" t t str)) | 635 (setq str (replace-match "" t t str)) |
634 (if (zerop (length str)) (setq str "\n")) | 636 ;; Re-add the default empty line, if applicable. |
635 (setq done (concat "-- last cmd: " cmd " --")))) | 637 (if (not (string-match "." str)) (setq str "\n\n")) |
636 (setq str (concat str "\n") done (concat done "\n")) | 638 (setq done (concat "-- last cmd: " cmd " --\n")))) |
637 ;; set the new header and footer | 639 ;; set the new header and footer |
638 (ewoc-set-hf cvs-cookies | 640 (ewoc-set-hf cvs-cookies |
639 str (concat "\n--------------------- " | 641 str (concat "\n--------------------- " |
640 (if tin "End" "Empty") | 642 (if tin "End" "Empty") |
641 " ---------------------\n" | 643 " ---------------------\n" |