diff options
| author | Dan Nicolaescu | 2008-03-14 16:12:31 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2008-03-14 16:12:31 +0000 |
| commit | ac51b1513dbb3c11db5e0dff4d48c4fd20d2801f (patch) | |
| tree | b820aea6f3ee86e26e4f8429afb89d31953bac0b | |
| parent | f9a9491fbef44d63b528f657c468748198964dcb (diff) | |
| download | emacs-ac51b1513dbb3c11db5e0dff4d48c4fd20d2801f.tar.gz emacs-ac51b1513dbb3c11db5e0dff4d48c4fd20d2801f.zip | |
(vc-bzr-print-log): Insert a file marker. Run the log
for each file in the list.
(vc-bzr-log-view-mode): Recognize the file marker.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/vc-bzr.el | 27 |
2 files changed, 22 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7e9cab82e94..eee071781ae 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2008-03-14 Dan Nicolaescu <dann@ics.uci.edu> | 1 | 2008-03-14 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 2 | ||
| 3 | * vc-bzr.el (vc-bzr-print-log): Insert a file marker. Run the log | ||
| 4 | for each file in the list. | ||
| 5 | (vc-bzr-log-view-mode): Recognize the file marker. | ||
| 6 | |||
| 3 | * emacs-lisp/lisp-mode.el (emacs-lisp-mode-map): Add menu entries | 7 | * emacs-lisp/lisp-mode.el (emacs-lisp-mode-map): Add menu entries |
| 4 | for checkdoc and profiling. | 8 | for checkdoc and profiling. |
| 5 | 9 | ||
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index 8e91c5c1b4d..54a4f866949 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el | |||
| @@ -375,8 +375,7 @@ EDITABLE is ignored." | |||
| 375 | (define-derived-mode vc-bzr-log-view-mode log-view-mode "Bzr-Log-View" | 375 | (define-derived-mode vc-bzr-log-view-mode log-view-mode "Bzr-Log-View" |
| 376 | (remove-hook 'log-view-mode-hook 'vc-bzr-log-view-mode) ;Deactivate the hack. | 376 | (remove-hook 'log-view-mode-hook 'vc-bzr-log-view-mode) ;Deactivate the hack. |
| 377 | (require 'add-log) | 377 | (require 'add-log) |
| 378 | ;; Don't have file markers, so use impossible regexp. | 378 | (set (make-local-variable 'log-view-file-re) "^Working file:[ \t]+\\(.+\\)") |
| 379 | (set (make-local-variable 'log-view-file-re) "\\'\\`") | ||
| 380 | (set (make-local-variable 'log-view-message-re) | 379 | (set (make-local-variable 'log-view-message-re) |
| 381 | "^ *-+\n *\\(?:revno: \\([0-9.]+\\)\\|merged: .+\\)") | 380 | "^ *-+\n *\\(?:revno: \\([0-9.]+\\)\\|merged: .+\\)") |
| 382 | (set (make-local-variable 'log-view-font-lock-keywords) | 381 | (set (make-local-variable 'log-view-font-lock-keywords) |
| @@ -392,13 +391,23 @@ EDITABLE is ignored." | |||
| 392 | 391 | ||
| 393 | (defun vc-bzr-print-log (files &optional buffer) ; get buffer arg in Emacs 22 | 392 | (defun vc-bzr-print-log (files &optional buffer) ; get buffer arg in Emacs 22 |
| 394 | "Get bzr change log for FILES into specified BUFFER." | 393 | "Get bzr change log for FILES into specified BUFFER." |
| 395 | ;; FIXME: `vc-bzr-command' runs `bzr log' with `LC_MESSAGES=C', so | 394 | ;; `vc-do-command' creates the buffer, but we need it before running |
| 396 | ;; the log display may not what the user wants - but I see no other | 395 | ;; the command. |
| 397 | ;; way of getting the above regexps working. | 396 | (vc-setup-buffer buffer) |
| 398 | (apply 'vc-bzr-command "log" buffer 0 files | 397 | ;; If the buffer exists from a previous invocation it might be |
| 399 | (if (stringp vc-bzr-log-switches) | 398 | ;; read-only. |
| 400 | (list vc-bzr-log-switches) | 399 | (let ((inhibit-read-only t)) |
| 401 | vc-bzr-log-switches)) | 400 | ;; FIXME: `vc-bzr-command' runs `bzr log' with `LC_MESSAGES=C', so |
| 401 | ;; the log display may not what the user wants - but I see no other | ||
| 402 | ;; way of getting the above regexps working. | ||
| 403 | (dolist (file files) | ||
| 404 | (with-current-buffer buffer | ||
| 405 | ;; Insert the file name so that log-view.el can find it. | ||
| 406 | (insert "Working file: " file "\n")) ;; Like RCS/CVS. | ||
| 407 | (apply 'vc-bzr-command "log" buffer 0 file | ||
| 408 | (if (stringp vc-bzr-log-switches) | ||
| 409 | (list vc-bzr-log-switches) | ||
| 410 | vc-bzr-log-switches)))) | ||
| 402 | ;; FIXME: Until Emacs-23, VC was missing a hook to sort out the mode for | 411 | ;; FIXME: Until Emacs-23, VC was missing a hook to sort out the mode for |
| 403 | ;; the buffer, or at least set the regexps right. | 412 | ;; the buffer, or at least set the regexps right. |
| 404 | (unless (fboundp 'vc-default-log-view-mode) | 413 | (unless (fboundp 'vc-default-log-view-mode) |