aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2005-12-28 18:47:12 +0000
committerStefan Monnier2005-12-28 18:47:12 +0000
commit07a95b81f44a2222360ce87120ff8bf12fe5f4c0 (patch)
treef3c8296b55db1c46dce379cb2754635711a76006
parent79c917052adc8f50b298c973bc6e028d34b1897d (diff)
downloademacs-07a95b81f44a2222360ce87120ff8bf12fe5f4c0.tar.gz
emacs-07a95b81f44a2222360ce87120ff8bf12fe5f4c0.zip
(vc-annotate-mode-map): Remove obsolete binding.
(vc-annotate-mode-menu): Remove left-over redundant declaration. Correct the construction of span entries. Simplify. (vc-annotate-display-select): Fix the nil case. (vc-annotate): Remove obsolete (and now broken) code. (vc-annotate-extract-revision-at-line): Remove obsolete code. (vc-annotate-time-span): Remove unused arg `quantize'. Simplify.
-rw-r--r--lisp/ChangeLog17
-rw-r--r--lisp/vc.el44
2 files changed, 26 insertions, 35 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f5c03725b07..289586f833a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12005-12-28 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * vc.el (vc-annotate-mode-map): Remove obsolete binding.
4 (vc-annotate-mode-menu): Remove left-over redundant declaration.
5 Correct the construction of span entries. Simplify.
6 (vc-annotate-display-select): Fix the nil case.
7 (vc-annotate): Remove obsolete (and now broken) code.
8 (vc-annotate-extract-revision-at-line): Remove obsolete code.
9 (vc-annotate-time-span): Remove unused arg `quantize'. Simplify.
10
12005-12-28 Luc Teirlinck <teirllm@auburn.edu> 112005-12-28 Luc Teirlinck <teirllm@auburn.edu>
2 12
3 * subr.el (lazy-completion-table): Correct typo in docstring. 13 * subr.el (lazy-completion-table): Correct typo in docstring.
@@ -9,8 +19,8 @@
9 19
102005-12-05 Ralf Angeli <angeli@iwi.uni-sb.de> 202005-12-05 Ralf Angeli <angeli@iwi.uni-sb.de>
11 21
12 * mail/smtpmail.el (smtpmail-try-auth-methods): Send 22 * mail/smtpmail.el (smtpmail-try-auth-methods):
13 credentials together with "AUTH PLAIN" command. 23 Send credentials together with "AUTH PLAIN" command.
14 24
152005-12-27 Richard M. Stallman <rms@gnu.org> 252005-12-27 Richard M. Stallman <rms@gnu.org>
16 26
@@ -58,8 +68,7 @@
582005-12-27 Juri Linkov <juri@jurta.org> 682005-12-27 Juri Linkov <juri@jurta.org>
59 69
60 * help-mode.el (help-insert-string): New function. Save buffer 70 * help-mode.el (help-insert-string): New function. Save buffer
61 contents in cases where it is impossible to recompute the old 71 contents in cases where it is impossible to recompute the old contents.
62 contents.
63 72
64 * descr-text.el (describe-char): Set help-xref-stack-item 73 * descr-text.el (describe-char): Set help-xref-stack-item
65 explicitly after buffer has been generated. 74 explicitly after buffer has been generated.
diff --git a/lisp/vc.el b/lisp/vc.el
index ed6b13ac2ec..770b37f7c9e 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -659,7 +659,6 @@ List of factors, used to expand/compress the time scale. See `vc-annotate'."
659 659
660(defvar vc-annotate-mode-map 660(defvar vc-annotate-mode-map
661 (let ((m (make-sparse-keymap))) 661 (let ((m (make-sparse-keymap)))
662 (define-key m [menu-bar] (make-sparse-keymap "VC-Annotate"))
663 (define-key m "A" 'vc-annotate-revision-previous-to-line) 662 (define-key m "A" 'vc-annotate-revision-previous-to-line)
664 (define-key m "D" 'vc-annotate-show-diff-revision-at-line) 663 (define-key m "D" 'vc-annotate-show-diff-revision-at-line)
665 (define-key m "J" 'vc-annotate-revision-at-line) 664 (define-key m "J" 'vc-annotate-revision-at-line)
@@ -670,9 +669,6 @@ List of factors, used to expand/compress the time scale. See `vc-annotate'."
670 m) 669 m)
671 "Local keymap used for VC-Annotate mode.") 670 "Local keymap used for VC-Annotate mode.")
672 671
673(defvar vc-annotate-mode-menu nil
674 "Local keymap used for VC-Annotate mode's menu bar menu.")
675
676;; Header-insertion hair 672;; Header-insertion hair
677 673
678(defcustom vc-static-header-alist 674(defcustom vc-static-header-alist
@@ -2964,7 +2960,7 @@ cover the range from the oldest annotation to the newest."
2964 (vc-annotate-display 2960 (vc-annotate-display
2965 (vc-annotate-time-span ;return the scaled colormap. 2961 (vc-annotate-time-span ;return the scaled colormap.
2966 vc-annotate-color-map 2962 vc-annotate-color-map
2967 (/ (- (if full newest current) oldest) 2963 (/ (- (if full newest current) oldest)
2968 (vc-annotate-car-last-cons vc-annotate-color-map))) 2964 (vc-annotate-car-last-cons vc-annotate-color-map)))
2969 (if full newest)) 2965 (if full newest))
2970 (message "Redisplaying annotation...done \(%s\)" 2966 (message "Redisplaying annotation...done \(%s\)"
@@ -2985,19 +2981,14 @@ cover the range from the oldest annotation to the newest."
2985 ,@(let ((oldest-in-map (vc-annotate-car-last-cons vc-annotate-color-map))) 2981 ,@(let ((oldest-in-map (vc-annotate-car-last-cons vc-annotate-color-map)))
2986 (mapcar (lambda (element) 2982 (mapcar (lambda (element)
2987 (let ((days (* element oldest-in-map))) 2983 (let ((days (* element oldest-in-map)))
2988 `([,(format "Span %.1f days" days) 2984 `[,(format "Span %.1f days" days)
2989 (unless (and (numberp vc-annotate-display-mode) 2985 (vc-annotate-display-select nil ,days)
2990 (= vc-annotate-display-mode ,days)) 2986 :style toggle :selected
2991 (vc-annotate-display-select nil ,days)) 2987 (eql vc-annotate-display-mode ,days) ]))
2992 :style toggle :selected
2993 (and (numberp vc-annotate-display-mode)
2994 (= vc-annotate-display-mode ,days)) ])))
2995 vc-annotate-menu-elements)) 2988 vc-annotate-menu-elements))
2996 ["Span ..." 2989 ["Span ..."
2997 (let ((days 2990 (vc-annotate-display-select
2998 (float (string-to-number 2991 nil (float (string-to-number (read-string "Span how many days? "))))]
2999 (read-string "Span how many days? ")))))
3000 (vc-annotate-display-select nil days)) t]
3001 "--" 2992 "--"
3002 ["Span to Oldest" 2993 ["Span to Oldest"
3003 (unless (eq vc-annotate-display-mode 'scale) 2994 (unless (eq vc-annotate-display-mode 'scale)
@@ -3031,6 +3022,8 @@ use; you may override this using the second optional arg MODE."
3031 (if (not vc-annotate-parent-rev) 3022 (if (not vc-annotate-parent-rev)
3032 (vc-annotate-mode)) 3023 (vc-annotate-mode))
3033 (cond ((null vc-annotate-display-mode) 3024 (cond ((null vc-annotate-display-mode)
3025 ;; The ratio is global, thus relative to the global color-map.
3026 (kill-local-variable 'vc-annotate-color-map)
3034 (vc-annotate-display-default vc-annotate-ratio)) 3027 (vc-annotate-display-default vc-annotate-ratio))
3035 ;; One of the auto-scaling modes 3028 ;; One of the auto-scaling modes
3036 ((eq vc-annotate-display-mode 'scale) 3029 ((eq vc-annotate-display-mode 'scale)
@@ -3100,9 +3093,6 @@ colors. `vc-annotate-background' specifies the background color."
3100 (rename-buffer temp-buffer-name t) 3093 (rename-buffer temp-buffer-name t)
3101 ;; In case it had to be uniquified. 3094 ;; In case it had to be uniquified.
3102 (setq temp-buffer-name (buffer-name)))) 3095 (setq temp-buffer-name (buffer-name))))
3103 (if (not (vc-find-backend-function vc-annotate-backend 'annotate-command))
3104 (error "Sorry, annotating is not implemented for %s"
3105 vc-annotate-backend))
3106 (with-output-to-temp-buffer temp-buffer-name 3096 (with-output-to-temp-buffer temp-buffer-name
3107 (vc-call annotate-command file (get-buffer temp-buffer-name) rev)) 3097 (vc-call annotate-command file (get-buffer temp-buffer-name) rev))
3108 (with-current-buffer temp-buffer-name 3098 (with-current-buffer temp-buffer-name
@@ -3143,9 +3133,6 @@ versions after."
3143(defun vc-annotate-extract-revision-at-line () 3133(defun vc-annotate-extract-revision-at-line ()
3144 "Extract the revision number of the current line." 3134 "Extract the revision number of the current line."
3145 ;; This function must be invoked from a buffer in vc-annotate-mode 3135 ;; This function must be invoked from a buffer in vc-annotate-mode
3146 (save-window-excursion
3147 (vc-ensure-vc-buffer)
3148 (setq vc-annotate-backend (vc-backend buffer-file-name)))
3149 (vc-call-backend vc-annotate-backend 'annotate-extract-revision-at-line)) 3136 (vc-call-backend vc-annotate-backend 'annotate-extract-revision-at-line))
3150 3137
3151(defun vc-annotate-revision-at-line () 3138(defun vc-annotate-revision-at-line ()
@@ -3243,17 +3230,12 @@ revision."
3243 (previous-line) 3230 (previous-line)
3244 (line-number-at-pos)))))))) 3231 (line-number-at-pos))))))))
3245 3232
3246(defun vc-annotate-time-span (a-list span &optional quantize) 3233(defun vc-annotate-time-span (a-list span)
3247 "Apply factor SPAN to the time-span of association list A-LIST. 3234 "Apply factor SPAN to the time-span of association list A-LIST.
3248Return the new alist. 3235Return the new alist."
3249Optionally quantize to the factor of QUANTIZE."
3250 ;; Apply span to each car of every cons 3236 ;; Apply span to each car of every cons
3251 (if (not (eq nil a-list)) 3237 (mapcar (lambda (elem) (cons (* (car elem) span) (cdr elem)))
3252 (append (list (cons (* (car (car a-list)) span) 3238 a-list))
3253 (cdr (car a-list))))
3254 (vc-annotate-time-span (nthcdr (or quantize ; optional
3255 1) ; Default to cdr
3256 a-list) span quantize))))
3257 3239
3258(defun vc-annotate-compcar (threshold a-list) 3240(defun vc-annotate-compcar (threshold a-list)
3259 "Test successive cons cells of A-LIST against THRESHOLD. 3241 "Test successive cons cells of A-LIST against THRESHOLD.