all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Paul Pogonyshev <pogonyshev@gmail.com>
Cc: 18189@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	[thread overview]
Message-ID: <87d2cfrcny.fsf@mail.jurta.org> (raw)
In-Reply-To: <CAG7Bpap7saOuPYcYkdsXnSyH-xqm-gBLa4EvfGM+x_L43ofeag@mail.gmail.com> (Paul Pogonyshev's message of "Mon, 4 Aug 2014 15:18:06 +0200")

> 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






  reply	other threads:[~2014-08-05  0:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-04 13:18 bug#18189: customized value of 'vc-annotate-background-mode' is applied only after restarting Emacs Paul Pogonyshev
2014-08-05  0:11 ` Juri Linkov [this message]
2014-08-06 17:32   ` Stefan Monnier
2014-08-08 23:31     ` Juri Linkov
2014-08-09  1:49       ` Stefan Monnier
2014-08-09 20:05       ` Glenn Morris
2014-08-09 23:57         ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d2cfrcny.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=18189@debbugs.gnu.org \
    --cc=pogonyshev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.