all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] Only set org-hide foreground if one is available
@ 2014-03-17 21:50 Nikolai Weibull
  2014-03-18 15:27 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Nikolai Weibull @ 2014-03-17 21:50 UTC (permalink / raw)
  To: emacs-orgmode; +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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-03-19  8:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-17 21:50 [PATCH] Only set org-hide foreground if one is available Nikolai Weibull
2014-03-18 15:27 ` Bastien
2014-03-18 18:12   ` Nikolai Weibull
2014-03-19  8:31     ` Bastien

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.