diff options
| author | Eli Zaretskii | 2006-01-13 19:56:54 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2006-01-13 19:56:54 +0000 |
| commit | e47f89f079c09db05b5eff303f047b419fa972a7 (patch) | |
| tree | 32b5b92a1906ce326ab1babbf0ff3fb18e591934 | |
| parent | 83dc149dec82db59100204c37138dc2fab916327 (diff) | |
| download | emacs-e47f89f079c09db05b5eff303f047b419fa972a7.tar.gz emacs-e47f89f079c09db05b5eff303f047b419fa972a7.zip | |
(widget-field-end): If the overlay is no longer associated with a buffer,
behave as if the overlay didn't exist.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/wid-edit.el | 34 |
2 files changed, 21 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 00eace0e644..fb53df771ca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2006-01-13 Martin Rudalics <rudalics@gmx.at> (tiny change) | 1 | 2006-01-13 Martin Rudalics <rudalics@gmx.at> (tiny change) |
| 2 | 2 | ||
| 3 | * wid-edit.el (widget-field-end): If the overlay is no longer | ||
| 4 | associated with a buffer, behave as if the overlay didn't exist. | ||
| 5 | |||
| 3 | * cus-edit.el (custom-add-see-also, custom-add-parent-links): Make | 6 | * cus-edit.el (custom-add-see-also, custom-add-parent-links): Make |
| 4 | sure the links use the `custom-link' face. | 7 | sure the links use the `custom-link' face. |
| 5 | 8 | ||
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 0735c467439..01b82b685c1 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el | |||
| @@ -1203,22 +1203,24 @@ When not inside a field, move to the previous button or field." | |||
| 1203 | ;; or if a special `boundary' field has been added after the widget | 1203 | ;; or if a special `boundary' field has been added after the widget |
| 1204 | ;; field. | 1204 | ;; field. |
| 1205 | (if (overlayp overlay) | 1205 | (if (overlayp overlay) |
| 1206 | (if (and (not (eq (with-current-buffer | 1206 | ;; Don't proceed if overlay has been removed from buffer. |
| 1207 | (widget-field-buffer widget) | 1207 | (when (overlay-buffer overlay) |
| 1208 | (save-restriction | 1208 | (if (and (not (eq (with-current-buffer |
| 1209 | ;; `widget-narrow-to-field' can be | 1209 | (widget-field-buffer widget) |
| 1210 | ;; active when this function is called | 1210 | (save-restriction |
| 1211 | ;; from an change-functions hook. So | 1211 | ;; `widget-narrow-to-field' can be |
| 1212 | ;; temporarily remove field narrowing | 1212 | ;; active when this function is called |
| 1213 | ;; before to call `get-char-property'. | 1213 | ;; from an change-functions hook. So |
| 1214 | (widen) | 1214 | ;; temporarily remove field narrowing |
| 1215 | (get-char-property (overlay-end overlay) | 1215 | ;; before to call `get-char-property'. |
| 1216 | 'field))) | 1216 | (widen) |
| 1217 | 'boundary)) | 1217 | (get-char-property (overlay-end overlay) |
| 1218 | (or widget-field-add-space | 1218 | 'field))) |
| 1219 | (null (widget-get widget :size)))) | 1219 | 'boundary)) |
| 1220 | (1- (overlay-end overlay)) | 1220 | (or widget-field-add-space |
| 1221 | (overlay-end overlay)) | 1221 | (null (widget-get widget :size)))) |
| 1222 | (1- (overlay-end overlay)) | ||
| 1223 | (overlay-end overlay))) | ||
| 1222 | (cdr overlay)))) | 1224 | (cdr overlay)))) |
| 1223 | 1225 | ||
| 1224 | (defun widget-field-find (pos) | 1226 | (defun widget-field-find (pos) |