diff options
| author | Jim Porter | 2025-05-31 12:11:01 -0700 |
|---|---|---|
| committer | Jim Porter | 2025-06-10 22:09:26 -0700 |
| commit | 24e6cd42330c341f3525e3fdc384e4a646dec733 (patch) | |
| tree | 1299a39547f45e6e4bbb1011b7cd78a4814ffb75 /src | |
| parent | 4a3c8e6e1df44b187b7286747e363232e8b4e0ea (diff) | |
| download | emacs-24e6cd42330c341f3525e3fdc384e4a646dec733.tar.gz emacs-24e6cd42330c341f3525e3fdc384e4a646dec733.zip | |
Improve documentation for display property functions
Specifically, use the term "display specification" more consistently to
distinguish from "display property", which is the full value of the
'display' text property.
* src/xdisp.c (find_display_property): Rename PROP to SPEC.
(Fget_display_property): Rename PROP to SPEC and improve docstring.
* lisp/emacs-lisp/subr-x.el (add-display-text-property): Rename PROP to
SPEC and improve docstring.
* doc/lispref/display.texi (Display Property): Reword documentation to
more-consistently refer to display specifications.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 291e069395b..27094f8886a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -5570,7 +5570,7 @@ setup_for_ellipsis (struct it *it, int len) | |||
| 5570 | 5570 | ||
| 5571 | 5571 | ||
| 5572 | static Lisp_Object | 5572 | static Lisp_Object |
| 5573 | find_display_property (Lisp_Object disp, Lisp_Object prop) | 5573 | find_display_property (Lisp_Object disp, Lisp_Object spec) |
| 5574 | { | 5574 | { |
| 5575 | Lisp_Object elem; | 5575 | Lisp_Object elem; |
| 5576 | if (NILP (disp)) | 5576 | if (NILP (disp)) |
| @@ -5583,7 +5583,7 @@ find_display_property (Lisp_Object disp, Lisp_Object prop) | |||
| 5583 | elem = AREF (disp, i); | 5583 | elem = AREF (disp, i); |
| 5584 | if (CONSP (elem) | 5584 | if (CONSP (elem) |
| 5585 | && CONSP (XCDR (elem)) | 5585 | && CONSP (XCDR (elem)) |
| 5586 | && EQ (XCAR (elem), prop)) | 5586 | && EQ (XCAR (elem), spec)) |
| 5587 | goto found; | 5587 | goto found; |
| 5588 | } | 5588 | } |
| 5589 | return Qnil; | 5589 | return Qnil; |
| @@ -5597,7 +5597,7 @@ find_display_property (Lisp_Object disp, Lisp_Object prop) | |||
| 5597 | elem = XCAR (disp); | 5597 | elem = XCAR (disp); |
| 5598 | if (CONSP (elem) | 5598 | if (CONSP (elem) |
| 5599 | && CONSP (XCDR (elem)) | 5599 | && CONSP (XCDR (elem)) |
| 5600 | && EQ (XCAR (elem), prop)) | 5600 | && EQ (XCAR (elem), spec)) |
| 5601 | goto found; | 5601 | goto found; |
| 5602 | 5602 | ||
| 5603 | /* Check that we have a proper list before going to the next | 5603 | /* Check that we have a proper list before going to the next |
| @@ -5612,7 +5612,7 @@ find_display_property (Lisp_Object disp, Lisp_Object prop) | |||
| 5612 | /* A simple display spec. */ | 5612 | /* A simple display spec. */ |
| 5613 | else if (CONSP (disp) | 5613 | else if (CONSP (disp) |
| 5614 | && CONSP (XCDR (disp)) | 5614 | && CONSP (XCDR (disp)) |
| 5615 | && EQ (XCAR (disp), prop)) | 5615 | && EQ (XCAR (disp), spec)) |
| 5616 | { | 5616 | { |
| 5617 | elem = disp; | 5617 | elem = disp; |
| 5618 | goto found; | 5618 | goto found; |
| @@ -5753,13 +5753,15 @@ display_min_width (struct it *it, ptrdiff_t charpos, | |||
| 5753 | 5753 | ||
| 5754 | DEFUN ("get-display-property", Fget_display_property, | 5754 | DEFUN ("get-display-property", Fget_display_property, |
| 5755 | Sget_display_property, 2, 4, 0, | 5755 | Sget_display_property, 2, 4, 0, |
| 5756 | doc: /* Get the value of the `display' property PROP at POSITION. | 5756 | doc: /* Get the value of the display specification SPEC at POSITION. |
| 5757 | If OBJECT, this should be a buffer or string where the property is | 5757 | SPEC is the car of the display specification to fetch, e.g. `height'. |
| 5758 | fetched from. If omitted, OBJECT defaults to the current buffer. | ||
| 5759 | 5758 | ||
| 5760 | If PROPERTIES, look for value of PROP in PROPERTIES instead of the | 5759 | OBJECT is either a string or a buffer to fetch the specification from. |
| 5761 | properties at POSITION. */) | 5760 | If omitted, OBJECT defaults to the current buffer. |
| 5762 | (Lisp_Object position, Lisp_Object prop, Lisp_Object object, | 5761 | |
| 5762 | If PROPERTIES is non-nil, look for value of SPEC in PROPERTIES instead | ||
| 5763 | of the properties at POSITION. */) | ||
| 5764 | (Lisp_Object position, Lisp_Object spec, Lisp_Object object, | ||
| 5763 | Lisp_Object properties) | 5765 | Lisp_Object properties) |
| 5764 | { | 5766 | { |
| 5765 | if (NILP (properties)) | 5767 | if (NILP (properties)) |
| @@ -5767,7 +5769,7 @@ properties at POSITION. */) | |||
| 5767 | else | 5769 | else |
| 5768 | CHECK_LIST (properties); | 5770 | CHECK_LIST (properties); |
| 5769 | 5771 | ||
| 5770 | return find_display_property (properties, prop); | 5772 | return find_display_property (properties, spec); |
| 5771 | } | 5773 | } |
| 5772 | 5774 | ||
| 5773 | 5775 | ||