comparison lisp/wid-edit.el @ 32903:63244e8732b3

(widget-specify-field): Revert to using local-map property, not keymap.
author Dave Love <fx@gnu.org>
date Thu, 26 Oct 2000 09:21:21 +0000
parents 182718ad9737
children 85599a2dac71
comparison
equal deleted inserted replaced
32902:b0cee304020f 32903:63244e8732b3
329 ;; C-n/C-p act more naturally when entering/leaving the field. We 329 ;; C-n/C-p act more naturally when entering/leaving the field. We
330 ;; do this by making a small secondary overlay to contain just that 330 ;; do this by making a small secondary overlay to contain just that
331 ;; one character. 331 ;; one character.
332 (let ((overlay (make-overlay (1- to) to nil t nil))) 332 (let ((overlay (make-overlay (1- to) to nil t nil)))
333 (overlay-put overlay 'field 'boundary) 333 (overlay-put overlay 'field 'boundary)
334 (overlay-put overlay 'keymap keymap) 334 ;; Use `local-map' here, not `keymap', so that normal editing
335 ;; works in the field when, say, Custom uses `suppress-keymap'.
336 (overlay-put overlay 'local-map keymap)
335 (overlay-put overlay 'face face) 337 (overlay-put overlay 'face face)
336 (overlay-put overlay 'help-echo help-echo)) 338 (overlay-put overlay 'help-echo help-echo))
337 (setq to (1- to)) 339 (setq to (1- to))
338 (setq rear-sticky t)) 340 (setq rear-sticky t))
339 (let ((overlay (make-overlay from to nil nil rear-sticky))) 341 (let ((overlay (make-overlay from to nil nil rear-sticky)))
340 (widget-put widget :field-overlay overlay) 342 (widget-put widget :field-overlay overlay)
341 ;;(overlay-put overlay 'detachable nil) 343 ;;(overlay-put overlay 'detachable nil)
342 (overlay-put overlay 'field widget) 344 (overlay-put overlay 'field widget)
343 (overlay-put overlay 'keymap keymap) 345 (overlay-put overlay 'local-map keymap)
344 (overlay-put overlay 'face face) 346 (overlay-put overlay 'face face)
345 (overlay-put overlay 'help-echo help-echo))) 347 (overlay-put overlay 'help-echo help-echo)))
346 (widget-specify-secret widget)) 348 (widget-specify-secret widget))
347 349
348 (defun widget-specify-secret (field) 350 (defun widget-specify-secret (field)