diff options
| author | Richard M. Stallman | 2004-12-05 14:19:01 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2004-12-05 14:19:01 +0000 |
| commit | 263a40a61b9f1d72d22cc41a0ee7162889498b58 (patch) | |
| tree | 4f6c2e99eb76bcb79baf6dbab886a418c91a8390 /lisp | |
| parent | 6f8ca5e414092a352473ff1153cdfaaa686f4f58 (diff) | |
| download | emacs-263a40a61b9f1d72d22cc41a0ee7162889498b58.tar.gz emacs-263a40a61b9f1d72d22cc41a0ee7162889498b58.zip | |
(widget-specify-field): Add `real-field' property to boundary.
(widget-field-at): Use it.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/wid-edit.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index f659518ee02..4888bf478df 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el | |||
| @@ -339,6 +339,8 @@ new value.") | |||
| 339 | ;; one character. | 339 | ;; one character. |
| 340 | (let ((overlay (make-overlay (1- to) to nil t nil))) | 340 | (let ((overlay (make-overlay (1- to) to nil t nil))) |
| 341 | (overlay-put overlay 'field 'boundary) | 341 | (overlay-put overlay 'field 'boundary) |
| 342 | ;; We need the real field for tabbing. | ||
| 343 | (overlay-put overlay 'real-field widget) | ||
| 342 | ;; Use `local-map' here, not `keymap', so that normal editing | 344 | ;; Use `local-map' here, not `keymap', so that normal editing |
| 343 | ;; works in the field when, say, Custom uses `suppress-keymap'. | 345 | ;; works in the field when, say, Custom uses `suppress-keymap'. |
| 344 | (overlay-put overlay 'local-map keymap) | 346 | (overlay-put overlay 'local-map keymap) |
| @@ -1149,7 +1151,7 @@ When not inside a field, move to the previous button or field." | |||
| 1149 | "Return the widget field at POS, or nil if none." | 1151 | "Return the widget field at POS, or nil if none." |
| 1150 | (let ((field (get-char-property (or pos (point)) 'field))) | 1152 | (let ((field (get-char-property (or pos (point)) 'field))) |
| 1151 | (if (eq field 'boundary) | 1153 | (if (eq field 'boundary) |
| 1152 | nil | 1154 | (get-char-property (or pos (point)) 'real-field) |
| 1153 | field))) | 1155 | field))) |
| 1154 | 1156 | ||
| 1155 | (defun widget-field-buffer (widget) | 1157 | (defun widget-field-buffer (widget) |