* 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