diff options
| author | Masatake YAMATO | 2004-04-27 21:00:31 +0000 |
|---|---|---|
| committer | Masatake YAMATO | 2004-04-27 21:00:31 +0000 |
| commit | f24485f172efcd20394f6d5040305fe02c38e043 (patch) | |
| tree | 39effd1f3527d173dda01551df7a666ec35615c8 | |
| parent | e23390fa015f523cba25fa4d952d7bee8c6c533f (diff) | |
| download | emacs-f24485f172efcd20394f6d5040305fe02c38e043.tar.gz emacs-f24485f172efcd20394f6d5040305fe02c38e043.zip | |
* 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.
| -rw-r--r-- | etc/NEWS | 3 | ||||
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/subr.el | 8 | ||||
| -rw-r--r-- | lisp/wid-edit.el | 3 | ||||
| -rw-r--r-- | man/ChangeLog | 5 | ||||
| -rw-r--r-- | man/widget.texi | 1 |
6 files changed, 28 insertions, 2 deletions
| @@ -3413,6 +3413,9 @@ using the text properties (esp. the face) of the prompt string. | |||
| 3413 | ** New function x-send-client-message sends a client message when | 3413 | ** New function x-send-client-message sends a client message when |
| 3414 | running under X. | 3414 | running under X. |
| 3415 | 3415 | ||
| 3416 | ** Arguments for remove-overlays are now optional, so that you can remove | ||
| 3417 | all overlays in the buffer by just calling (remove-overlay). | ||
| 3418 | |||
| 3416 | ** New packages: | 3419 | ** New packages: |
| 3417 | 3420 | ||
| 3418 | *** The new package gdb-ui.el provides an enhanced graphical interface to | 3421 | *** The new package gdb-ui.el provides an enhanced graphical interface to |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ecf9cfeaf9c..c01308a4e1a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2004-04-28 Masatake YAMATO <jet@gyve.org> | ||
| 2 | |||
| 3 | * subr.el (remove-overlays): Make arguments | ||
| 4 | optional. | ||
| 5 | |||
| 6 | * wid-edit.el (widget-specify-button): Put evaporate to the | ||
| 7 | overlay for sample. | ||
| 8 | (widget-specify-sample): Put evaporate to the overlay for sample. | ||
| 9 | (widget-specify-doc): Put evaporate to the overlay for documentation. | ||
| 10 | |||
| 1 | 2004-04-27 Jesper Harder <harder@ifa.au.dk> | 11 | 2004-04-27 Jesper Harder <harder@ifa.au.dk> |
| 2 | 12 | ||
| 3 | * info.el (info-apropos): Make it an index node. Align node names | 13 | * info.el (info-apropos): Make it an index node. Align node names |
diff --git a/lisp/subr.el b/lisp/subr.el index 516b0fc781a..a9acc15606d 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1528,9 +1528,13 @@ If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there." | |||
| 1528 | (overlay-put o1 (pop props) (pop props))) | 1528 | (overlay-put o1 (pop props) (pop props))) |
| 1529 | o1)) | 1529 | o1)) |
| 1530 | 1530 | ||
| 1531 | (defun remove-overlays (beg end name val) | 1531 | (defun remove-overlays (&optional beg end name val) |
| 1532 | "Clear BEG and END of overlays whose property NAME has value VAL. | 1532 | "Clear BEG and END of overlays whose property NAME has value VAL. |
| 1533 | Overlays might be moved and or split." | 1533 | Overlays might be moved and or split. |
| 1534 | If BEG is nil, `(point-min)' is used. If END is nil, `(point-max)' | ||
| 1535 | is used." | ||
| 1536 | (unless beg (setq beg (point-min))) | ||
| 1537 | (unless end (setq end (point-max))) | ||
| 1534 | (if (< end beg) | 1538 | (if (< end beg) |
| 1535 | (setq beg (prog1 end (setq end beg)))) | 1539 | (setq beg (prog1 end (setq end beg)))) |
| 1536 | (save-excursion | 1540 | (save-excursion |
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 2392ccdfb47..33f1f06ba9a 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el | |||
| @@ -382,6 +382,7 @@ new value.") | |||
| 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)) |
| @@ -401,6 +402,7 @@ new value.") | |||
| 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) |
| @@ -408,6 +410,7 @@ new value.") | |||
| 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) |
diff --git a/man/ChangeLog b/man/ChangeLog index f8fd73368f9..2514ea979b8 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2004-04-28 Masatake YAMATO <jet@gyve.org> | ||
| 2 | |||
| 3 | * widget.texi (Programming Example): Remove | ||
| 4 | overlays. | ||
| 5 | |||
| 1 | 2004-04-27 Jesper Harder <harder@ifa.au.dk> | 6 | 2004-04-27 Jesper Harder <harder@ifa.au.dk> |
| 2 | 7 | ||
| 3 | * faq.texi, viper.texi, dired-x.texi, autotype.texi: lisp -> Lisp. | 8 | * faq.texi, viper.texi, dired-x.texi, autotype.texi: lisp -> Lisp. |
diff --git a/man/widget.texi b/man/widget.texi index c919a394efe..457af8a07bb 100644 --- a/man/widget.texi +++ b/man/widget.texi | |||
| @@ -341,6 +341,7 @@ Interface}). | |||
| 341 | (make-local-variable 'widget-example-repeat) | 341 | (make-local-variable 'widget-example-repeat) |
| 342 | (let ((inhibit-read-only t)) | 342 | (let ((inhibit-read-only t)) |
| 343 | (erase-buffer)) | 343 | (erase-buffer)) |
| 344 | (remove-overlays) | ||
| 344 | (widget-insert "Here is some documentation.\n\nName: ") | 345 | (widget-insert "Here is some documentation.\n\nName: ") |
| 345 | (widget-create 'editable-field | 346 | (widget-create 'editable-field |
| 346 | :size 13 | 347 | :size 13 |