From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Edward O'Connor" Newsgroups: gmane.emacs.devel Subject: Custom themes: safe themes Date: Wed, 7 Sep 2011 10:52:29 -0700 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1315417979 14445 80.91.229.12 (7 Sep 2011 17:52:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 7 Sep 2011 17:52:59 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 07 19:52:55 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R1MIx-0006ZV-BX for ged-emacs-devel@m.gmane.org; Wed, 07 Sep 2011 19:52:55 +0200 Original-Received: from localhost ([::1]:33898 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1MIw-0007Lm-W7 for ged-emacs-devel@m.gmane.org; Wed, 07 Sep 2011 13:52:54 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:47137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1MIt-0007LP-U7 for emacs-devel@gnu.org; Wed, 07 Sep 2011 13:52:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1MIs-00059R-60 for emacs-devel@gnu.org; Wed, 07 Sep 2011 13:52:51 -0400 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:35889) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1MIr-00059M-W8 for emacs-devel@gnu.org; Wed, 07 Sep 2011 13:52:50 -0400 Original-Received: by wwf10 with SMTP id 10so6210226wwf.30 for ; Wed, 07 Sep 2011 10:52:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=Po8X1bmnuYfrhCy/Js9XTOfy6RrmGhCxeA2Qq0mYXmA=; b=BhUYXSrUL3yuyyCII9ofigvFgeKVjXPbhuP7R2LhkLWINOFGuH6BY1Gv3stsN8eVoE MP5mog9+McB+rXGlU+Y09hFb3BY/g6uDfAxj5tOwzUB6OP3KUFLM73de5xtiA1E00Tq5 BT2C5wW58pyTd432mOYeKtTBLJiali2XA+0kA= Original-Received: by 10.216.133.5 with SMTP id p5mr5475802wei.87.1315417969209; Wed, 07 Sep 2011 10:52:49 -0700 (PDT) Original-Received: by 10.216.46.9 with HTTP; Wed, 7 Sep 2011 10:52:29 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.49 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:143798 Archived-At: Hi, When I first tried to load my Emacs-23-compatible Custom theme in a nightly build of Emacs 24, I was prompted with "Loading a theme can run Lisp code. Really load?" Since I wrote the theme myself, I'd like to prevent this prompt. The `custom-safe-themes' mechanism doesn't really work for me, because different machines might have different versions of the theme installed. I'd really rather not carry around N sha1 hashes in my .emacs file, and I don't want to get prompted anew whenever I happen to make a change in the theme. So I guess I have to use the (new) NO-CONFIRM argument to `load-theme'. Because I use the same .emacs across all machines & have different Emacs versions installed in different places, the only safe way to call `load-theme' with this argument looks to be: (condition-case nil (load-theme 'foo t) (wrong-number-of-arguments (load-theme 'foo))) This is kind of gross. It would be nice if `custom-safe-themes' had a way to bless all versions of some theme, instead of requiring a different entry per version. (Actually, I ended up not even using `load-theme' to load my theme, but for another reason which I'll detail in my next email.) Ted