aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2019-03-04 19:49:47 +0200
committerEli Zaretskii2019-03-04 19:49:47 +0200
commit52fd40068e0f8b41bd29eaec1334299eb86d0bff (patch)
tree2bb0153b3f4268d26d031d3b3b4980be6d4e0578
parentf872b65b2f6b83f3cee2eb0e80cb296d1de99505 (diff)
downloademacs-52fd40068e0f8b41bd29eaec1334299eb86d0bff.tar.gz
emacs-52fd40068e0f8b41bd29eaec1334299eb86d0bff.zip
Minor improvement of documentation of '(when CONDITION . SPEC)'
* doc/lispref/display.texi (Other Display Specs): Add a caveat to using the '(when CONDITION . SPEC)' display specs.
-rw-r--r--doc/lispref/display.texi10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 921d58a1f3a..7892c15b462 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -4853,6 +4853,16 @@ and the buffer position where the @code{display} property was found,
4853respectively. Both positions can be different when @code{object} is a 4853respectively. Both positions can be different when @code{object} is a
4854string. 4854string.
4855 4855
4856Note that @var{condition} will only be evaluated when redisplay
4857examines the text where this display spec is located, so this feature
4858is best suited for conditions that are relatively stable, i.e.@:
4859yield, for each particular buffer position, the same results on every
4860evaluation. If the results change for the same text location, e.g.,
4861if the result depends on the position of point, then the conditional
4862specification might not do what you want, because redisplay examines
4863only those parts of buffer text where it has reasons to assume that
4864something changed since the last display cycle.
4865
4856@node Display Margins 4866@node Display Margins
4857@subsection Displaying in the Margins 4867@subsection Displaying in the Margins
4858@cindex display margins 4868@cindex display margins