comparison lisp/wid-edit.el @ 32935:85599a2dac71

(widget-add-change): Don't bother with make-local-hook.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 27 Oct 2000 00:54:52 +0000
parents 63244e8732b3
children eb486d535fd8
comparison
equal deleted inserted replaced
32934:fa11b28f7ce5 32935:85599a2dac71
1120 '("Attempt to change text outside editable field"))) 1120 '("Attempt to change text outside editable field")))
1121 (widget-field-use-before-change 1121 (widget-field-use-before-change
1122 (widget-apply from-field :notify from-field)))))) 1122 (widget-apply from-field :notify from-field))))))
1123 1123
1124 (defun widget-add-change () 1124 (defun widget-add-change ()
1125 (make-local-hook 'post-command-hook)
1126 (remove-hook 'post-command-hook 'widget-add-change t) 1125 (remove-hook 'post-command-hook 'widget-add-change t)
1127 (make-local-hook 'before-change-functions)
1128 (add-hook 'before-change-functions 'widget-before-change nil t) 1126 (add-hook 'before-change-functions 'widget-before-change nil t)
1129 (make-local-hook 'after-change-functions)
1130 (add-hook 'after-change-functions 'widget-after-change nil t)) 1127 (add-hook 'after-change-functions 'widget-after-change nil t))
1131 1128
1132 (defun widget-after-change (from to old) 1129 (defun widget-after-change (from to old)
1133 "Adjust field size and text properties." 1130 "Adjust field size and text properties."
1134 (let ((field (widget-field-find from)) 1131 (let ((field (widget-field-find from))