diff options
| author | Stefan Monnier | 2014-04-15 09:21:18 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-04-15 09:21:18 -0400 |
| commit | 20fa59a004fff136c8fe8d4cd160c12d208c5cde (patch) | |
| tree | ca419d8f8bfd86149ee28c3b1aad2d961bc33695 /src/buffer.c | |
| parent | f596f897c6681236092a47cabf51d07abff2286b (diff) | |
| download | emacs-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 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c index a1678951984..3e1359707cd 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -4168,9 +4168,10 @@ OVERLAY. */) | |||
| 4168 | } | 4168 | } |
| 4169 | 4169 | ||
| 4170 | 4170 | ||
| 4171 | DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 1, 0, | 4171 | DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 2, 0, |
| 4172 | doc: /* Return a list of the overlays that contain the character at POS. */) | 4172 | doc: /* Return a list of the overlays that contain the character at POS. |
| 4173 | (Lisp_Object pos) | 4173 | If SORTED is non-nil, then sort them by decreasing priority. */) |
| 4174 | (Lisp_Object pos, Lisp_Object sorted) | ||
| 4174 | { | 4175 | { |
| 4175 | ptrdiff_t len, noverlays; | 4176 | ptrdiff_t len, noverlays; |
| 4176 | Lisp_Object *overlay_vec; | 4177 | Lisp_Object *overlay_vec; |
| @@ -4190,6 +4191,10 @@ DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 1, 0, | |||
| 4190 | noverlays = overlays_at (XINT (pos), 1, &overlay_vec, &len, | 4191 | noverlays = overlays_at (XINT (pos), 1, &overlay_vec, &len, |
| 4191 | NULL, NULL, 0); | 4192 | NULL, NULL, 0); |
| 4192 | 4193 | ||
| 4194 | if (!NILP (sorted)) | ||
| 4195 | noverlays = sort_overlays (overlay_vec, noverlays, | ||
| 4196 | WINDOWP (sorted) ? XWINDOW (sorted) : NULL); | ||
| 4197 | |||
| 4193 | /* Make a list of them all. */ | 4198 | /* Make a list of them all. */ |
| 4194 | result = Flist (noverlays, overlay_vec); | 4199 | result = Flist (noverlays, overlay_vec); |
| 4195 | 4200 | ||