From: Nikolai Weibull <now@disu.se>
To: emacs-orgmode@gnu.org
Cc: Nikolai Weibull <now@disu.se>
Subject: [PATCH] Only set org-hide foreground if one is available
Date: Mon, 17 Mar 2014 22:50:37 +0100 [thread overview]
Message-ID: <1395093037-22550-1-git-send-email-now@disu.se> (raw)
* 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
next reply other threads:[~2014-03-17 22:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-17 21:50 Nikolai Weibull [this message]
2014-03-18 15:27 ` [PATCH] Only set org-hide foreground if one is available Bastien
2014-03-18 18:12 ` Nikolai Weibull
2014-03-19 8:31 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1395093037-22550-1-git-send-email-now@disu.se \
--to=now@disu.se \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).