1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

* lisp/vc/vc-bzr.el (vc-bzr-revision-keywords): Update.

(vc-bzr-revision-completion-table): Add support for annotate and date.
This commit is contained in:
Stefan Monnier 2011-07-01 13:45:31 -04:00
parent 1a1e3f3207
commit eb604e34e5
2 changed files with 20 additions and 3 deletions

View file

@ -1172,8 +1172,9 @@ stream. Standard error output is discarded."
(eval-and-compile
(defconst vc-bzr-revision-keywords
'("revno" "revid" "last" "before"
"tag" "date" "ancestor" "branch" "submit")))
;; bzr help revisionspec | sed -ne 's/^\([a-z]*\):$/"\1"/p' | sort -u
'("ancestor" "annotate" "before" "branch" "date" "last" "mainline" "revid"
"revno" "submit" "svn" "tag")))
(defun vc-bzr-revision-completion-table (files)
(lexical-let ((files files))
@ -1211,6 +1212,19 @@ stream. Standard error output is discarded."
(push (match-string-no-properties 1) table)))
(completion-table-with-context prefix table tag pred action)))
((string-match "\\`annotate:" string)
(completion-table-with-context
(substring string 0 (match-end 0))
(apply-partially #'completion-table-with-terminator '(":" . "\\`a\\`")
#'completion-file-name-table)
(substring string (match-end 0)) pred action))
((string-match "\\`date:" string)
(completion-table-with-context
(substring string 0 (match-end 0))
'("yesterday" "today" "tomorrow")
(substring string (match-end 0)) pred action))
((string-match "\\`\\([a-z]+\\):" string)
;; no actual completion for the remaining keywords.
(completion-table-with-context (substring string 0 (match-end 0))