[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110267: * lisp/vc/pcvs.el (cvs-clean
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110267: * lisp/vc/pcvs.el (cvs-cleanup-collection): Keep entries that are currently |
Date: |
Sat, 29 Sep 2012 23:44:35 -0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110267
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Sat 2012-09-29 23:44:35 -0400
message:
* lisp/vc/pcvs.el (cvs-cleanup-collection): Keep entries that are currently
visited in a buffer.
(cvs-insert-visited-file): New function.
(find-file-hook): Use it.
* lisp/vc/pcvs-info.el (cvs-fileinfo-pp): Don't use non-existent faces.
modified:
lisp/ChangeLog
lisp/vc/pcvs-info.el
lisp/vc/pcvs.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-09-30 03:30:25 +0000
+++ b/lisp/ChangeLog 2012-09-30 03:44:35 +0000
@@ -1,5 +1,12 @@
2012-09-30 Stefan Monnier <address@hidden>
+ * vc/pcvs.el (cvs-cleanup-collection): Keep entries that are currently
+ visited in a buffer.
+ (cvs-insert-visited-file): New function.
+ (find-file-hook): Use it.
+
+ * vc/pcvs-info.el (cvs-fileinfo-pp): Don't use non-existent faces.
+
* vc/log-edit.el (log-edit-font-lock-keywords): Ignore case to
chose face.
(log-edit-empty-buffer-p): Don't require a space after a header.
=== modified file 'lisp/vc/pcvs-info.el'
--- a/lisp/vc/pcvs-info.el 2012-07-10 11:51:54 +0000
+++ b/lisp/vc/pcvs-info.el 2012-09-30 03:44:35 +0000
@@ -124,7 +124,7 @@
(define-obsolete-face-alias 'cvs-marked-face 'cvs-marked "22.1")
(defface cvs-msg
- '((t (:slant italic)))
+ '((t :slant italic))
"PCL-CVS face used to highlight CVS messages."
:group 'pcl-cvs)
(define-obsolete-face-alias 'cvs-msg-face 'cvs-msg "22.1")
@@ -358,7 +358,7 @@
;;(MOD-CONFLICT "Not Removed")
(`DEAD "")
(_ (capitalize (symbol-name type)))))
- (face (let ((sym (intern
+ (face (let ((sym (intern-soft
(concat "cvs-fi-"
(downcase (symbol-name type))
"-face"))))
=== modified file 'lisp/vc/pcvs.el'
--- a/lisp/vc/pcvs.el 2012-07-10 11:51:54 +0000
+++ b/lisp/vc/pcvs.el 2012-09-30 03:44:35 +0000
@@ -60,8 +60,6 @@
;; - rework the displaying of error messages.
;; - allow to flush messages only
;; - allow to protect files like ChangeLog from flushing
-;; - automatically cvs-mode-insert files from find-file-hook
-;; (and don't flush them as long as they are visited)
;; - query the user for cvs-get-marked (for some cmds or if nothing's selected)
;; - don't return the first (resp last) FI if the cursor is before
;; (resp after) it.
@@ -877,7 +875,10 @@
;; remove entries
(`DEAD nil)
;; handled also?
- (`UP-TO-DATE (not rm-handled))
+ (`UP-TO-DATE
+ (if (find-buffer-visiting (cvs-fileinfo->full-name fi))
+ t
+ (not rm-handled)))
;; keep the rest
(_ (not (run-hook-with-args-until-success
'cvs-cleanup-functions fi))))))
@@ -1617,7 +1618,8 @@
(defun-cvs-mode (cvs-mode-diff . DOUBLE) (flags)
"Diff the selected files against the repository.
This command compares the files in your working area against the
-revision which they are based upon."
+revision which they are based upon.
+See also `cvs-diff-ignore-marks'."
(interactive
(list (cvs-add-branch-prefix
(cvs-add-secondary-branch-prefix
@@ -2435,6 +2437,21 @@
(add-hook 'after-save-hook 'cvs-mark-buffer-changed)
+(defun cvs-insert-visited-file ()
+ (let* ((file (expand-file-name buffer-file-name))
+ (version (and (fboundp 'vc-backend)
+ (eq (vc-backend file) 'CVS)
+ (vc-working-revision file))))
+ (when version
+ (save-current-buffer
+ (dolist (cvs-buf (buffer-list))
+ (set-buffer cvs-buf)
+ ;; look for a corresponding pcl-cvs buffer
+ (when (and (eq major-mode 'cvs-mode)
+ (string-prefix-p default-directory file))
+ (cvs-insert-file file)))))))
+
+(add-hook 'find-file-hook 'cvs-insert-visited-file 'append)
(provide 'pcvs)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r110267: * lisp/vc/pcvs.el (cvs-cleanup-collection): Keep entries that are currently,
Stefan Monnier <=