* 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'.
This commit is contained in:
11
src/buffer.c
11
src/buffer.c
@@ -4168,9 +4168,10 @@ OVERLAY. */)
|
||||
}
|
||||
|
||||
|
||||
DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 1, 0,
|
||||
doc: /* Return a list of the overlays that contain the character at POS. */)
|
||||
(Lisp_Object pos)
|
||||
DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 2, 0,
|
||||
doc: /* Return a list of the overlays that contain the character at POS.
|
||||
If SORTED is non-nil, then sort them by decreasing priority. */)
|
||||
(Lisp_Object pos, Lisp_Object sorted)
|
||||
{
|
||||
ptrdiff_t len, noverlays;
|
||||
Lisp_Object *overlay_vec;
|
||||
@@ -4190,6 +4191,10 @@ DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 1, 0,
|
||||
noverlays = overlays_at (XINT (pos), 1, &overlay_vec, &len,
|
||||
NULL, NULL, 0);
|
||||
|
||||
if (!NILP (sorted))
|
||||
noverlays = sort_overlays (overlay_vec, noverlays,
|
||||
WINDOWP (sorted) ? XWINDOW (sorted) : NULL);
|
||||
|
||||
/* Make a list of them all. */
|
||||
result = Flist (noverlays, overlay_vec);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user