diff options
| author | Stefan Monnier | 2012-09-29 23:44:35 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-09-29 23:44:35 -0400 |
| commit | e01c13fea4176aab4ec3dadc9e29e82efe967239 (patch) | |
| tree | 2c4393db5d456af671e4f145684006e76c824976 | |
| parent | 02661b3a811a769064ad91757fb681b52ae8f4a1 (diff) | |
| download | emacs-e01c13fea4176aab4ec3dadc9e29e82efe967239.tar.gz emacs-e01c13fea4176aab4ec3dadc9e29e82efe967239.zip | |
* 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.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/vc/pcvs-info.el | 4 | ||||
| -rw-r--r-- | lisp/vc/pcvs.el | 25 |
3 files changed, 30 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 98fc9066e3e..093c87eba70 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | 2012-09-30 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2012-09-30 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * vc/pcvs.el (cvs-cleanup-collection): Keep entries that are currently | ||
| 4 | visited in a buffer. | ||
| 5 | (cvs-insert-visited-file): New function. | ||
| 6 | (find-file-hook): Use it. | ||
| 7 | |||
| 8 | * vc/pcvs-info.el (cvs-fileinfo-pp): Don't use non-existent faces. | ||
| 9 | |||
| 3 | * vc/log-edit.el (log-edit-font-lock-keywords): Ignore case to | 10 | * vc/log-edit.el (log-edit-font-lock-keywords): Ignore case to |
| 4 | chose face. | 11 | chose face. |
| 5 | (log-edit-empty-buffer-p): Don't require a space after a header. | 12 | (log-edit-empty-buffer-p): Don't require a space after a header. |
diff --git a/lisp/vc/pcvs-info.el b/lisp/vc/pcvs-info.el index 36572640cfc..e863096d587 100644 --- a/lisp/vc/pcvs-info.el +++ b/lisp/vc/pcvs-info.el | |||
| @@ -124,7 +124,7 @@ to confuse some users sometimes." | |||
| 124 | (define-obsolete-face-alias 'cvs-marked-face 'cvs-marked "22.1") | 124 | (define-obsolete-face-alias 'cvs-marked-face 'cvs-marked "22.1") |
| 125 | 125 | ||
| 126 | (defface cvs-msg | 126 | (defface cvs-msg |
| 127 | '((t (:slant italic))) | 127 | '((t :slant italic)) |
| 128 | "PCL-CVS face used to highlight CVS messages." | 128 | "PCL-CVS face used to highlight CVS messages." |
| 129 | :group 'pcl-cvs) | 129 | :group 'pcl-cvs) |
| 130 | (define-obsolete-face-alias 'cvs-msg-face 'cvs-msg "22.1") | 130 | (define-obsolete-face-alias 'cvs-msg-face 'cvs-msg "22.1") |
| @@ -358,7 +358,7 @@ For use by the cookie package." | |||
| 358 | ;;(MOD-CONFLICT "Not Removed") | 358 | ;;(MOD-CONFLICT "Not Removed") |
| 359 | (`DEAD "") | 359 | (`DEAD "") |
| 360 | (_ (capitalize (symbol-name type))))) | 360 | (_ (capitalize (symbol-name type))))) |
| 361 | (face (let ((sym (intern | 361 | (face (let ((sym (intern-soft |
| 362 | (concat "cvs-fi-" | 362 | (concat "cvs-fi-" |
| 363 | (downcase (symbol-name type)) | 363 | (downcase (symbol-name type)) |
| 364 | "-face")))) | 364 | "-face")))) |
diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el index 659151a31e9..4bc3eaf8c2c 100644 --- a/lisp/vc/pcvs.el +++ b/lisp/vc/pcvs.el | |||
| @@ -60,8 +60,6 @@ | |||
| 60 | ;; - rework the displaying of error messages. | 60 | ;; - rework the displaying of error messages. |
| 61 | ;; - allow to flush messages only | 61 | ;; - allow to flush messages only |
| 62 | ;; - allow to protect files like ChangeLog from flushing | 62 | ;; - allow to protect files like ChangeLog from flushing |
| 63 | ;; - automatically cvs-mode-insert files from find-file-hook | ||
| 64 | ;; (and don't flush them as long as they are visited) | ||
| 65 | ;; - query the user for cvs-get-marked (for some cmds or if nothing's selected) | 63 | ;; - query the user for cvs-get-marked (for some cmds or if nothing's selected) |
| 66 | ;; - don't return the first (resp last) FI if the cursor is before | 64 | ;; - don't return the first (resp last) FI if the cursor is before |
| 67 | ;; (resp after) it. | 65 | ;; (resp after) it. |
| @@ -877,7 +875,10 @@ RM-MSGS if non-nil means remove messages." | |||
| 877 | ;; remove entries | 875 | ;; remove entries |
| 878 | (`DEAD nil) | 876 | (`DEAD nil) |
| 879 | ;; handled also? | 877 | ;; handled also? |
| 880 | (`UP-TO-DATE (not rm-handled)) | 878 | (`UP-TO-DATE |
| 879 | (if (find-buffer-visiting (cvs-fileinfo->full-name fi)) | ||
| 880 | t | ||
| 881 | (not rm-handled))) | ||
| 881 | ;; keep the rest | 882 | ;; keep the rest |
| 882 | (_ (not (run-hook-with-args-until-success | 883 | (_ (not (run-hook-with-args-until-success |
| 883 | 'cvs-cleanup-functions fi)))))) | 884 | 'cvs-cleanup-functions fi)))))) |
| @@ -1617,7 +1618,8 @@ With prefix argument, prompt for cvs flags." | |||
| 1617 | (defun-cvs-mode (cvs-mode-diff . DOUBLE) (flags) | 1618 | (defun-cvs-mode (cvs-mode-diff . DOUBLE) (flags) |
| 1618 | "Diff the selected files against the repository. | 1619 | "Diff the selected files against the repository. |
| 1619 | This command compares the files in your working area against the | 1620 | This command compares the files in your working area against the |
| 1620 | revision which they are based upon." | 1621 | revision which they are based upon. |
| 1622 | See also `cvs-diff-ignore-marks'." | ||
| 1621 | (interactive | 1623 | (interactive |
| 1622 | (list (cvs-add-branch-prefix | 1624 | (list (cvs-add-branch-prefix |
| 1623 | (cvs-add-secondary-branch-prefix | 1625 | (cvs-add-secondary-branch-prefix |
| @@ -2435,6 +2437,21 @@ The exact behavior is determined also by `cvs-dired-use-hook'." | |||
| 2435 | 2437 | ||
| 2436 | (add-hook 'after-save-hook 'cvs-mark-buffer-changed) | 2438 | (add-hook 'after-save-hook 'cvs-mark-buffer-changed) |
| 2437 | 2439 | ||
| 2440 | (defun cvs-insert-visited-file () | ||
| 2441 | (let* ((file (expand-file-name buffer-file-name)) | ||
| 2442 | (version (and (fboundp 'vc-backend) | ||
| 2443 | (eq (vc-backend file) 'CVS) | ||
| 2444 | (vc-working-revision file)))) | ||
| 2445 | (when version | ||
| 2446 | (save-current-buffer | ||
| 2447 | (dolist (cvs-buf (buffer-list)) | ||
| 2448 | (set-buffer cvs-buf) | ||
| 2449 | ;; look for a corresponding pcl-cvs buffer | ||
| 2450 | (when (and (eq major-mode 'cvs-mode) | ||
| 2451 | (string-prefix-p default-directory file)) | ||
| 2452 | (cvs-insert-file file))))))) | ||
| 2453 | |||
| 2454 | (add-hook 'find-file-hook 'cvs-insert-visited-file 'append) | ||
| 2438 | 2455 | ||
| 2439 | (provide 'pcvs) | 2456 | (provide 'pcvs) |
| 2440 | 2457 | ||