diff options
| author | Karl Heuer <kwzh@gnu.org> | 1999-03-30 18:09:57 +0000 |
|---|---|---|
| committer | Karl Heuer <kwzh@gnu.org> | 1999-03-30 18:09:57 +0000 |
| commit | 808bcfd2c7c582208f2d73f639ae4c927d71af13 (patch) | |
| tree | a66e9b4d4c684aa2d4dd81ee10fff008e7d668fc /lisp | |
| parent | 00ac134b3daa58c5edb70febb6c8c3c9323f916f (diff) | |
| download | emacs-808bcfd2c7c582208f2d73f639ae4c927d71af13.tar.gz | |
(widget-before-change): Signal text-read-only rather
than an ordinary error.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/wid-edit.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 43e756b977e..4dbd7e6b089 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -1243,10 +1243,12 @@ Unlike (get-char-property POS 'field) this, works with empty fields too." (to-field (widget-field-find to))) (cond ((not (eq from-field to-field)) (add-hook 'post-command-hook 'widget-add-change nil t) - (error "Change should be restricted to a single field")) + (signal 'text-read-only + '("Change should be restricted to a single field"))) ((null from-field) (add-hook 'post-command-hook 'widget-add-change nil t) - (error "Attempt to change text outside editable field")) + (signal 'text-read-only + '("Attempt to change text outside editable field"))) (widget-field-use-before-change (condition-case nil (widget-apply from-field :notify from-field) |
