Commit 2346acf6 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

Require CL.

(vc-cvs-revision-table, vc-cvs-revision-completion-table):
New functions to provide completion of revision names.
parent 98ad325c
2007-07-12 Stefan Monnier <monnier@iro.umontreal.ca>
* vc-cvs.el: Require CL.
(vc-cvs-revision-table, vc-cvs-revision-completion-table):
New functions to provide completion of revision names.
* vc-cvs.el (vc-functions): Clear up the cache when reloading the file.
(vc-cvs-annotate-first-line-re): New const.
(vc-cvs-annotate-process-filter): New fun.
(vc-cvs-annotate-command): Use them and run the command asynchronously.
2007-07-12 Paul Pogonyshev <pogonyshev@gmx.net> 2007-07-12 Paul Pogonyshev <pogonyshev@gmx.net>
* emacs-lisp/eldoc.el (eldoc-last-data): Revise documentation. * emacs-lisp/eldoc.el (eldoc-last-data): Revise documentation.
......
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
;;; Code: ;;; Code:
(eval-when-compile (eval-when-compile (require 'cl) (require 'vc))
(require 'vc))
;; Clear up the cache to force vc-call to check again and discover ;; Clear up the cache to force vc-call to check again and discover
;; new functions when we reload this file. ;; new functions when we reload this file.
...@@ -932,7 +931,34 @@ is non-nil." ...@@ -932,7 +931,34 @@ is non-nil."
(vc-file-setprop file 'vc-checkout-time 0) (vc-file-setprop file 'vc-checkout-time 0)
(if set-state (vc-file-setprop file 'vc-state 'edited))))))))) (if set-state (vc-file-setprop file 'vc-state 'edited)))))))))
;; Completion of revision names.
;; Just so I don't feel like I'm duplicating code from pcl-cvs, I'll use
;; `cvs log' so I can list all the revision numbers rather than only
;; tag names.
(defun vc-cvs-revision-table (file)
(let ((default-directory (file-name-directory file))
(res nil))
(with-temp-buffer
(vc-cvs-command t nil file "log")
(goto-char (point-min))
(when (re-search-forward "^symbolic names:\n" nil t)
(while (looking-at "^ \\(.*\\): \\(.*\\)")
(push (cons (match-string 1) (match-string 2)) res)
(forward-line 1)))
(while (re-search-forward "^revision \\([0-9.]+\\)" nil t)
(push (match-string 1) res))
res)))
(defun vc-cvs-revision-completion-table (file)
(lexical-let ((file file)
table)
(setq table (lazy-completion-table
table (lambda () (vc-cvs-revision-table file))))
table))
(provide 'vc-cvs) (provide 'vc-cvs)
;;; arch-tag: 60e1402a-aa53-4607-927a-cf74f144b432 ;; arch-tag: 60e1402a-aa53-4607-927a-cf74f144b432
;;; vc-cvs.el ends here ;;; vc-cvs.el ends here
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment