*** vc.el 09 Jul 2007 23:10:04 +0200 1.432 --- vc.el 16 Jul 2007 01:09:39 +0200 *************** *** 3123,3129 **** use; you may override this using the second optional arg MODE." (interactive) (if mode (setq vc-annotate-display-mode mode)) ! (pop-to-buffer (or buffer (current-buffer))) (cond ((null vc-annotate-display-mode) ;; The ratio is global, thus relative to the global color-map. (kill-local-variable 'vc-annotate-color-map) --- 3123,3129 ---- use; you may override this using the second optional arg MODE." (interactive) (if mode (setq vc-annotate-display-mode mode)) ! (if buffer (set-buffer buffer)) (cond ((null vc-annotate-display-mode) ;; The ratio is global, thus relative to the global color-map. (kill-local-variable 'vc-annotate-color-map) *************** *** 3183,3193 **** (vc-ensure-vc-buffer) (setq vc-annotate-display-mode display-mode) ;Not sure why. --Stef (let* ((temp-buffer-name (format "*Annotate %s (rev %s)*" (buffer-name) rev)) ! (temp-buffer-show-function 'vc-annotate-display-select) ! ;; If BUF is specified, we presume the caller maintains current line, ! ;; so we don't need to do it here. This implementation may give ! ;; strange results occasionally in the case of REV != WORKFILE-REV. ! (current-line (unless buf (line-number-at-pos)))) (message "Annotating...") ;; If BUF is specified it tells in which buffer we should put the ;; annotations. This is used when switching annotations to another --- 3183,3189 ---- (vc-ensure-vc-buffer) (setq vc-annotate-display-mode display-mode) ;Not sure why. --Stef (let* ((temp-buffer-name (format "*Annotate %s (rev %s)*" (buffer-name) rev)) ! (current-line (line-number-at-pos))) (message "Annotating...") ;; If BUF is specified it tells in which buffer we should put the ;; annotations. This is used when switching annotations to another *************** *** 3196,3221 **** (rename-buffer temp-buffer-name t) ;; In case it had to be uniquified. (setq temp-buffer-name (buffer-name)))) ! (with-output-to-temp-buffer temp-buffer-name ! (vc-call annotate-command file (get-buffer temp-buffer-name) rev) ! ;; we must setup the mode first, and then set our local ! ;; variables before the show-function is called at the exit of ! ;; with-output-to-temp-buffer ! (with-current-buffer temp-buffer-name ! (if (not (equal major-mode 'vc-annotate-mode)) ! (vc-annotate-mode)) ! (set (make-local-variable 'vc-annotate-backend) (vc-backend file)) ! (set (make-local-variable 'vc-annotate-parent-file) file) ! (set (make-local-variable 'vc-annotate-parent-rev) rev) ! (set (make-local-variable 'vc-annotate-parent-display-mode) ! display-mode))) ! ! (vc-exec-after ! `(progn ! (when ,current-line ! (goto-line ,current-line ,temp-buffer-name)) ! (unless (active-minibuffer-window) ! (message "Annotating... done")))))) (defun vc-annotate-prev-version (prefix) "Visit the annotation of the version previous to this one. --- 3192,3215 ---- (rename-buffer temp-buffer-name t) ;; In case it had to be uniquified. (setq temp-buffer-name (buffer-name)))) ! (vc-call annotate-command file temp-buffer-name rev) ! ;; we must setup the mode first, and then set our local ! ;; variables before the show-function is called ! (with-current-buffer temp-buffer-name ! (if (not (equal major-mode 'vc-annotate-mode)) ! (vc-annotate-mode)) ! (set (make-local-variable 'vc-annotate-backend) (vc-backend file)) ! (set (make-local-variable 'vc-annotate-parent-file) file) ! (set (make-local-variable 'vc-annotate-parent-rev) rev) ! (set (make-local-variable 'vc-annotate-parent-display-mode) ! display-mode) ! (vc-annotate-display-select temp-buffer-name) ! (vc-exec-after ! `(progn ! (goto-line ,current-line ,temp-buffer-name) ! (pop-to-buffer ,temp-buffer-name) ! (unless (active-minibuffer-window) ! (message "Annotating... done"))))))) (defun vc-annotate-prev-version (prefix) "Visit the annotation of the version previous to this one. *************** *** 3312,3318 **** (if (not (equal major-mode 'vc-annotate-mode)) (message "Cannot be invoked outside of a vc annotate buffer") (let* ((buf (current-buffer)) - (oldline (line-number-at-pos)) (revspeccopy revspec) (newrev nil)) (cond --- 3306,3311 ---- *************** *** 3339,3348 **** (when newrev (vc-annotate vc-annotate-parent-file newrev vc-annotate-parent-display-mode ! buf) ! (goto-line (min oldline (progn (goto-char (point-max)) ! (previous-line) ! (line-number-at-pos))) buf))))) (defun vc-annotate-compcar (threshold a-list) "Test successive cons cells of A-LIST against THRESHOLD. --- 3332,3338 ---- (when newrev (vc-annotate vc-annotate-parent-file newrev vc-annotate-parent-display-mode ! buf))))) (defun vc-annotate-compcar (threshold a-list) "Test successive cons cells of A-LIST against THRESHOLD.