Mercurial > emacs
comparison lisp/wid-edit.el @ 55202:4c64ee838f41
* subr.el (remove-overlays): Make arguments optional.
* wid-edit.el (widget-specify-button): Put evaporate to the
overlay for sample.
(widget-specify-sample): Put evaporate to the overlay for sample.
(widget-specify-doc): Put evaporate to the overlay for documentation.
* etc/NEWS: Write about remove-overlays's arguments.
* man/widget.texi: Add remove-overlays to the example.
author | Masatake YAMATO <jet@gyve.org> |
---|---|
date | Tue, 27 Apr 2004 21:00:31 +0000 |
parents | 15266cc5ed84 |
children | b001dc626000 |
comparison
equal
deleted
inserted
replaced
55201:7fff56f5b73c | 55202:4c64ee838f41 |
---|---|
380 (widget-put widget :button-overlay overlay) | 380 (widget-put widget :button-overlay overlay) |
381 (if (functionp help-echo) | 381 (if (functionp help-echo) |
382 (setq help-echo 'widget-mouse-help)) | 382 (setq help-echo 'widget-mouse-help)) |
383 (overlay-put overlay 'button widget) | 383 (overlay-put overlay 'button widget) |
384 (overlay-put overlay 'keymap (widget-get widget :keymap)) | 384 (overlay-put overlay 'keymap (widget-get widget :keymap)) |
385 (overlay-put overlay 'evaporate t) | |
385 ;; We want to avoid the face with image buttons. | 386 ;; We want to avoid the face with image buttons. |
386 (unless (widget-get widget :suppress-face) | 387 (unless (widget-get widget :suppress-face) |
387 (overlay-put overlay 'face (widget-apply widget :button-face-get)) | 388 (overlay-put overlay 'face (widget-apply widget :button-face-get)) |
388 (overlay-put overlay 'mouse-face widget-mouse-face)) | 389 (overlay-put overlay 'mouse-face widget-mouse-face)) |
389 (overlay-put overlay 'help-echo help-echo))) | 390 (overlay-put overlay 'help-echo help-echo))) |
399 | 400 |
400 (defun widget-specify-sample (widget from to) | 401 (defun widget-specify-sample (widget from to) |
401 "Specify sample for WIDGET between FROM and TO." | 402 "Specify sample for WIDGET between FROM and TO." |
402 (let ((overlay (make-overlay from to nil t nil))) | 403 (let ((overlay (make-overlay from to nil t nil))) |
403 (overlay-put overlay 'face (widget-apply widget :sample-face-get)) | 404 (overlay-put overlay 'face (widget-apply widget :sample-face-get)) |
405 (overlay-put overlay 'evaporate t) | |
404 (widget-put widget :sample-overlay overlay))) | 406 (widget-put widget :sample-overlay overlay))) |
405 | 407 |
406 (defun widget-specify-doc (widget from to) | 408 (defun widget-specify-doc (widget from to) |
407 "Specify documentation for WIDGET between FROM and TO." | 409 "Specify documentation for WIDGET between FROM and TO." |
408 (let ((overlay (make-overlay from to nil t nil))) | 410 (let ((overlay (make-overlay from to nil t nil))) |
409 (overlay-put overlay 'widget-doc widget) | 411 (overlay-put overlay 'widget-doc widget) |
410 (overlay-put overlay 'face widget-documentation-face) | 412 (overlay-put overlay 'face widget-documentation-face) |
413 (overlay-put overlay 'evaporate t) | |
411 (widget-put widget :doc-overlay overlay))) | 414 (widget-put widget :doc-overlay overlay))) |
412 | 415 |
413 (defmacro widget-specify-insert (&rest form) | 416 (defmacro widget-specify-insert (&rest form) |
414 "Execute FORM without inheriting any text properties." | 417 "Execute FORM without inheriting any text properties." |
415 `(save-restriction | 418 `(save-restriction |