From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#18189: customized value of 'vc-annotate-background-mode' is applied only after restarting Emacs Date: Sat, 09 Aug 2014 02:31:50 +0300 Organization: JURTA Message-ID: <87d2cajxyp.fsf@mail.jurta.org> References: <87d2cfrcny.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1407545491 25659 80.91.229.3 (9 Aug 2014 00:51:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Aug 2014 00:51:31 +0000 (UTC) Cc: Paul Pogonyshev , 18189@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 09 02:51:24 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XFusU-0000Nl-42 for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Aug 2014 02:51:22 +0200 Original-Received: from localhost ([::1]:53674 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFusT-00067y-PJ for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Aug 2014 20:51:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFusI-0005x6-J0 for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2014 20:51:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XFusB-0003XR-2x for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2014 20:51:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFusB-0003WX-0P for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2014 20:51:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XFusA-0004T3-B8 for bug-gnu-emacs@gnu.org; Fri, 08 Aug 2014 20:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Aug 2014 00:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18189 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18189-submit@debbugs.gnu.org id=B18189.140754540817100 (code B ref 18189); Sat, 09 Aug 2014 00:51:02 +0000 Original-Received: (at 18189) by debbugs.gnu.org; 9 Aug 2014 00:50:08 +0000 Original-Received: from localhost ([127.0.0.1]:35910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFurG-0004Rj-QF for submit@debbugs.gnu.org; Fri, 08 Aug 2014 20:50:07 -0400 Original-Received: from alc-vshost7.dreamhost.com ([69.163.216.107]:35196 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFurA-0004Qz-2v for 18189@debbugs.gnu.org; Fri, 08 Aug 2014 20:50:01 -0400 Original-Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id E8C023728FFFCF; Fri, 8 Aug 2014 17:49:57 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Wed, 06 Aug 2014 13:32:59 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92315 Archived-At: >> +(put 'vc-annotate-background-mode 'custom-set >> + (lambda (symbol value) >> + (set-default symbol value) >> + (ignore-errors >> + (custom-reevaluate-setting 'vc-annotate-color-map)))) > > Why not provide it directly in the `defcustom'? `vc-annotate-background-mode' is defined before `vc-annotate-color-map' in the source file vc-annotate.el, so there is a cyclic dependency in these variables. When I tried to provide it directly in the `defcustom' :set (lambda (symbol value) (set-default symbol value) (ignore-errors (custom-reevaluate-setting 'vc-annotate-color-map))) then loading the file failed with the error: Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) #[257 "\211\300_\301\302\303\"\304\305E\306\307\310\311\312E&\207" [nil v= ector format "Span %.1f days" vc-annotate-display-select nil :style toggle = :selected eql vc-annotate-display-mode] 11 "\n\n(fn ELEMENT)"](2) mapcar(#[257 "\211\300_\301\302\303\"\304\305E\306\307\310\311\312E&\207"= [nil vector format "Span %.1f days" vc-annotate-display-select nil :style = toggle :selected eql vc-annotate-display-mode] 11 "\n\n(fn ELEMENT)"] (2 0.= 5 0.1 0.01)) byte-code("\304\305\306\307\310\311\312!\313\314\315\316\317\320!\321\"\3= 22\323%\n\"\262\324\325\326\327\325\330\331\332\333\334\335\325\336\337\340= \320\341\342\343\344\345\346\347BBE\350BBBB\"\351BBBBBBBBBBBBBBB\"BB$\207" = [vc-annotate-mode-map vc-annotate-color-map vc-annotate-menu-elements vc-an= notate-backend easy-menu-do-define vc-annotate-mode-menu "VC Annotate Displ= ay Menu" "VC-Annotate" ["By Color Map Range" (unless (null vc-annotate-disp= lay-mode) (setq vc-annotate-display-mode nil) (vc-annotate-display-select))= :style toggle :selected (null vc-annotate-display-mode)] append vc-annotat= e-oldest-in-map mapcar make-byte-code 257 "\211\300_\301\302\303\"\304\305E= \306\307\310\311\312E&\207" vconcat vector [vector format "Span %.1f days" = vc-annotate-display-select nil :style toggle :selected eql vc-annotate-disp= lay-mode] 11 "\n\n(fn ELEMENT)" ["Span ..." (vc-annotate-display-select nil= (float (string-to-number (read-string "Span how many days? "))))] "--" ["S= pan to Oldest" (unless (eq vc-annotate-display-mode (quote scale)) (vc-anno= tate-display-select nil (quote scale))) :help "Use an autoscaled color map = from the oldest annotation to the current time" :style toggle :selected (eq= vc-annotate-display-mode (quote scale))] ["Span Oldest->Newest" (unless (e= q vc-annotate-display-mode (quote fullscale)) (vc-annotate-display-select n= il (quote fullscale))) :help "Use an autoscaled color map from the oldest t= o the newest annotation" :style toggle :selected (eq vc-annotate-display-mo= de (quote fullscale))] ["Toggle annotation visibility" vc-annotate-toggle-a= nnotation-visibility :help "Toggle whether the annotation is visible or not= "] ["Annotate previous revision" vc-annotate-prev-revision :help "Visit the= annotation of the revision previous to this one"] ["Annotate next revision= " vc-annotate-next-revision :help "Visit the annotation of the revision aft= er this one"] ["Annotate revision at line" vc-annotate-revision-at-line :he= lp "Visit the annotation of the revision identified in the current line"] [= "Annotate revision previous to line" vc-annotate-revision-previous-to-line = :help "Visit the annotation of the revision before the revision at line"] [= "Annotate latest revision" vc-annotate-working-revision :help "Visit the an= notation of the working revision of this file"] ["Show log of revision at l= ine" vc-annotate-show-log-revision-at-line :help "Visit the log of the revi= sion at line"] ["Show diff of revision at line" vc-annotate-show-diff-revis= ion-at-line :help "Visit the diff of the revision at line from its previous= revision"] apply "Show changeset diff of revision at line" vc-annotate-sho= w-changeset-diff-revision-at-line :enable eq (quote repository) vc-call-bac= kend ((quote revision-granularity)) (:help "Visit the diff of the revision = at line from its previous revision") (["Visit revision at line" vc-annotate= -find-revision-at-line :help "Visit the revision identified in the current = line"])] 32) autoload-do-load((autoload "vc-annotate" 1541696 t nil) vc-annotate) command-execute(vc-annotate)