[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18189: customized value of 'vc-annotate-background-mode' is applied
From: |
Juri Linkov |
Subject: |
bug#18189: customized value of 'vc-annotate-background-mode' is applied only after restarting Emacs |
Date: |
Tue, 05 Aug 2014 03:11:05 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) |
> To reproduce:
>
> - customize the variable and toggle its value;
> - observe that annotation buffers still look the same, even if you generate
> them anew;
> - new variable value is only honored if you restart Emacs.
>
> Ideally the value should be apply on-the-fly. But at least it should be
> applied if I hit 'C-x v g' after customizing the variable.
I believe this should be implemented by this patch:
=== modified file 'lisp/vc/vc-annotate.el'
--- lisp/vc/vc-annotate.el 2014-07-08 08:49:18 +0000
+++ lisp/vc/vc-annotate.el 2014-08-05 00:07:51 +0000
@@ -139,6 +139,12 @@ (defcustom vc-annotate-color-map
:type 'alist
:group 'vc)
+(put 'vc-annotate-background-mode 'custom-set
+ (lambda (symbol value)
+ (set-default symbol value)
+ (ignore-errors
+ (custom-reevaluate-setting 'vc-annotate-color-map))))
+
(defcustom vc-annotate-very-old-color (if vc-annotate-background-mode
"#CCCCFF" "#3F3FFF")
"Color for lines older than the current color range in \\[vc-annotate]."
:type 'string