branch: externals/spacious-padding commit ff3c6c3aec29272ca21b09686762e183791443d8 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Always return a non-nil value when setting an overline Otherwise, we get a nil value which is then wiped out by 'flatten-list', resulting in a broken face. Thanks to Chinmay Dalal for reporting the bug and for helping me create a reproducible test case. This was done in issue 35: <https://github.com/protesilaos/spacious-padding/issues/35>. --- README.org | 6 +++--- spacious-padding.el | 13 ++++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/README.org b/README.org index 3749dd2dcc..aa1fb3b768 100644 --- a/README.org +++ b/README.org @@ -314,9 +314,9 @@ help matters. + Contributions to code or the manual :: Lucas Gruss, Martin Marshall, Neo Dim, Ruby Iris Juric. -+ Ideas and/or user feedback :: Aronne Raimondi, Damien Cassou, Julian - Flake, Lou Woell, Lucas Gruss, Nicolas Semrau, Pierre Baille, - Stefano Rodighiero, Tobias Tschinkowitz, Tomasz Hołubowicz, ++ Ideas and/or user feedback :: Aronne Raimondi, Chinmay Dalal, Damien + Cassou, Julian Flake, Lou Woell, Lucas Gruss, Nicolas Semrau, Pierre + Baille, Stefano Rodighiero, Tobias Tschinkowitz, Tomasz Hołubowicz, domsch1988, tusharhero. Inspiration for this package comes from Nicolas Rougier's impressive diff --git a/spacious-padding.el b/spacious-padding.el index 49152de296..b9f6ce564c 100644 --- a/spacious-padding.el +++ b/spacious-padding.el @@ -317,12 +317,15 @@ is non-nil, do not return a fallback value: just nil." "Get overline foreground value for FACE with FALLBACK face if needed. Use SUBTLE-KEY to determine the value based on `spacious-padding-subtle-frame-lines', falling back to FACE, then -FALLBACK." +FALLBACK. Fall back to a non-nil value if not of these return something +more specific." (let ((subtle-value (plist-get spacious-padding-subtle-frame-lines subtle-key))) - (cond - ((stringp subtle-value) subtle-value) - ((facep subtle-value) (face-foreground subtle-value nil face)) - (t (face-foreground face nil fallback))))) + (or + (cond + ((stringp subtle-value) subtle-value) + ((facep subtle-value) (face-foreground subtle-value nil face)) + (t (face-foreground face nil fallback))) + t))) (defun spacious-padding-set-face-box-padding (face fallback &optional subtle-key) "Return face attributes for FACE with FALLBACK face background.