aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorStefan Monnier2014-04-15 09:21:18 -0400
committerStefan Monnier2014-04-15 09:21:18 -0400
commit20fa59a004fff136c8fe8d4cd160c12d208c5cde (patch)
treeca419d8f8bfd86149ee28c3b1aad2d961bc33695 /doc
parentf596f897c6681236092a47cabf51d07abff2286b (diff)
downloademacs-20fa59a004fff136c8fe8d4cd160c12d208c5cde.tar.gz
emacs-20fa59a004fff136c8fe8d4cd160c12d208c5cde.zip
* src/buffer.c (Foverlays_at): Add argument `sorted'.
* doc/lispref/display.texi (Overlay Properties): Reword the doc of `priority'. (Finding Overlays): Document new arg of `overlays-at'. * lisp/obsolete/lucid.el (extent-at): * lisp/htmlfontify.el (hfy-overlay-props-at): Use the new `sorted' arg of overlays-at. (hfy-fontify-buffer): Remove unused var `orig-ovls'. * lisp/ps-def.el (ps-generate-postscript-with-faces1): Use the new `sorted' arg of overlays-at. Use `invisible-p'.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/display.texi23
1 files changed, 13 insertions, 10 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 0246d1a44de..acbef6b9495 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -1475,8 +1475,10 @@ the buffer's undo list.
1475 1475
1476 Since more than one overlay can specify a property value for the 1476 Since more than one overlay can specify a property value for the
1477same character, Emacs lets you specify a priority value of each 1477same character, Emacs lets you specify a priority value of each
1478overlay. You should not make assumptions about which overlay will 1478overlay. In case two overlays have the same priority value, and one
1479prevail when there is a conflict and they have the same priority. 1479is nested in the other, then the inner one will have priority over the
1480outer one. If neither is nested in the other then you should not make
1481assumptions about which overlay will prevail.
1480 1482
1481 These functions read and set the properties of an overlay: 1483 These functions read and set the properties of an overlay:
1482 1484
@@ -1507,9 +1509,9 @@ of them:
1507@table @code 1509@table @code
1508@item priority 1510@item priority
1509@kindex priority @r{(overlay property)} 1511@kindex priority @r{(overlay property)}
1510This property's value (which should be a non-negative integer) 1512This property's value determines the priority of the overlay. No priority, or
1511determines the priority of the overlay. No priority, or @code{nil}, 1513@code{nil}, means zero. A non-nil and non-integer value has
1512means zero. 1514undefined behavior.
1513 1515
1514The priority matters when two or more overlays cover the same 1516The priority matters when two or more overlays cover the same
1515character and both specify the same property; the one whose 1517character and both specify the same property; the one whose
@@ -1706,11 +1708,12 @@ Properties}.
1706@node Finding Overlays 1708@node Finding Overlays
1707@subsection Searching for Overlays 1709@subsection Searching for Overlays
1708 1710
1709@defun overlays-at pos 1711@defun overlays-at pos &optional sorted
1710This function returns a list of all the overlays that cover the 1712This function returns a list of all the overlays that cover the character at
1711character at position @var{pos} in the current buffer. The list is in 1713position @var{pos} in the current buffer. If @var{sorted} is non-nil, the list
1712no particular order. An overlay contains position @var{pos} if it 1714is in decreasing order of priority, otherwise it is in no particular order.
1713begins at or before @var{pos}, and ends after @var{pos}. 1715An overlay contains position @var{pos} if it begins at or before @var{pos}, and
1716ends after @var{pos}.
1714 1717
1715To illustrate usage, here is a Lisp function that returns a list of the 1718To illustrate usage, here is a Lisp function that returns a list of the
1716overlays that specify property @var{prop} for the character at point: 1719overlays that specify property @var{prop} for the character at point: