Mercurial > emacs
comparison lisp/wid-edit.el @ 61308:8fc6a70b402a
(widget-field-end): Temporarily remove field
narrowing before to call `get-char-property'.
author | David Ponce <david@dponce.com> |
---|---|
date | Tue, 05 Apr 2005 06:41:09 +0000 |
parents | b302445f7b00 |
children | 31aa9a390538 |
comparison
equal
deleted
inserted
replaced
61307:0592ebb75598 | 61308:8fc6a70b402a |
---|---|
1183 (let ((overlay (widget-get widget :field-overlay))) | 1183 (let ((overlay (widget-get widget :field-overlay))) |
1184 ;; Don't subtract one if local-map works at the end of the overlay, | 1184 ;; Don't subtract one if local-map works at the end of the overlay, |
1185 ;; or if a special `boundary' field has been added after the widget | 1185 ;; or if a special `boundary' field has been added after the widget |
1186 ;; field. | 1186 ;; field. |
1187 (if (overlayp overlay) | 1187 (if (overlayp overlay) |
1188 (if (and (not (eq (get-char-property (overlay-end overlay) | 1188 (if (and (not (eq (with-current-buffer |
1189 'field | 1189 (widget-field-buffer widget) |
1190 (widget-field-buffer widget)) | 1190 (save-restriction |
1191 ;; `widget-narrow-to-field' can be | |
1192 ;; active when this function is called | |
1193 ;; from an change-functions hook. So | |
1194 ;; temporarily remove field narrowing | |
1195 ;; before to call `get-char-property'. | |
1196 (widen) | |
1197 (get-char-property (overlay-end overlay) | |
1198 'field))) | |
1191 'boundary)) | 1199 'boundary)) |
1192 (or widget-field-add-space | 1200 (or widget-field-add-space |
1193 (null (widget-get widget :size)))) | 1201 (null (widget-get widget :size)))) |
1194 (1- (overlay-end overlay)) | 1202 (1- (overlay-end overlay)) |
1195 (overlay-end overlay)) | 1203 (overlay-end overlay)) |