From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikolai Weibull Subject: [PATCH] Only set org-hide foreground if one is available Date: Mon, 17 Mar 2014 22:50:37 +0100 Message-ID: <1395093037-22550-1-git-send-email-now@disu.se> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPfvS-0007TF-JB for emacs-orgmode@gnu.org; Mon, 17 Mar 2014 18:22:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPfvI-0002Hc-40 for emacs-orgmode@gnu.org; Mon, 17 Mar 2014 18:22:30 -0400 Received: from smtprelay-b32.telenor.se ([213.150.131.21]:33300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPfvH-0002Gr-LX for emacs-orgmode@gnu.org; Mon, 17 Mar 2014 18:22:20 -0400 Received: from ipb3.telenor.se (ipb3.telenor.se [195.54.127.166]) by smtprelay-b32.telenor.se (Postfix) with ESMTP id 6A4B8E9F63 for ; Mon, 17 Mar 2014 22:50:46 +0100 (CET) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Nikolai Weibull * org.el (org-mode): Add guard around set-face-foreground. (org-mode): When loading Org buffers through desktop, there will not be a foreground set for org-hide. Therefore, simply do not set the foreground of org-hide unless there is one to set. --- lisp/org.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 5a02c66..b991692 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5509,7 +5509,9 @@ The following commands are available: (unless org-inhibit-startup-visibility-stuff (org-set-startup-visibility)))) ;; Try to set org-hide correctly - (set-face-foreground 'org-hide (org-find-invisible-foreground))) + (let ((foreground (org-find-invisible-foreground))) + (if foreground + (set-face-foreground 'org-hide foreground)))) ;; Update `customize-package-emacs-version-alist' (add-to-list 'customize-package-emacs-version-alist -- 1.8.5.4