# HG changeset patch # User Richard M. Stallman # Date 1072734689 0 # Node ID 0f3abb6bbf2747d20bfdbc9d7b2f64930363b734 # Parent 6fddc60d9cbcaaec3cc4e63a63fc04cc7b2117af (Examining Properties): Add get-char-property-and-overlay. Change arg name in get-char-property. (Special Properties): Update handling of keymap property. diff -r 6fddc60d9cbc -r 0f3abb6bbf27 lispref/text.texi --- a/lispref/text.texi Mon Dec 29 21:37:17 2003 +0000 +++ b/lispref/text.texi Mon Dec 29 21:51:29 2003 +0000 @@ -1890,7 +1890,8 @@ Column number computations ignore the width of the window and the amount of horizontal scrolling. Consequently, a column value can be -arbitrarily high. The first (or leftmost) column is numbered 0. +arbitrarily high. The first (or leftmost) column is numbered 0. They +also ignore overlays and text properties, aside from invisibility. @defun current-column This function returns the horizontal position of point, measured in @@ -2409,7 +2410,7 @@ the @var{prop} property of that symbol. @end defun -@defun get-char-property pos prop &optional object +@defun get-char-property position prop &optional object This function is like @code{get-text-property}, except that it checks overlays first and then text properties. @xref{Overlays}. @@ -2422,6 +2423,20 @@ overlays. @end defun +@defun get-char-property-and-overlay position prop &optional object +This is like @code{get-char-property}, but gives extra information +about the overlay that the property value comes from. + +Its value is a cons cell whose @sc{car} is the property value, the +same value @code{get-char-property} would return with the same +arguments. Its @sc{cdr} is the overlay in which the property was +found, or @code{nil}, if it was found as a text property or not found +at all. + +If @var{position} is at the end of @var{object}, both the @sc{car} and +the @sc{cdr} of the value are @code{nil}. +@end defun + @defvar char-property-alias-alist This variable holds an alist which maps property names to a list of alternative property names. If a character does not specify a direct @@ -2860,11 +2875,13 @@ commands. The property's value for the character before point applies if it is non-@code{nil} and rear-sticky, and the property's value for the character after point applies if it is non-@code{nil} and -front-sticky. When the value applies, it is used for key lookup -before the buffer's local map. (For mouse clicks, the position of the -click is used instead of the position of point.) If the property -value is a symbol, the symbol's function definition is used as the -keymap. @xref{Active Keymaps}. +front-sticky. (For mouse clicks, the position of the click is used +instead of the position of point.) If the property value is a symbol, +the symbol's function definition is used as the keymap. + +When this keymap applies, it is used for key lookup before the minor +mode keymaps and before the buffer's local map. @xref{Active +Keymaps}. @item local-map @kindex local-map @r{(text property)}