GNU bug report logs - #18189
customized value of 'vc-annotate-background-mode' is applied only after restarting Emacs

Previous Next

Package: emacs;

Reported by: Paul Pogonyshev <pogonyshev <at> gmail.com>

Date: Mon, 4 Aug 2014 13:19:02 UTC

Severity: minor

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> jurta.org>
To: Paul Pogonyshev <pogonyshev <at> gmail.com>
Cc: 18189 <at> debbugs.gnu.org
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
> 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





This bug report was last modified 10 years and 348 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.