Mercurial > hg > xemacs-beta
comparison lisp/hyperbole/hui-em19-b.el @ 114:8619ce7e4c50 r20-1b9
Import from CVS: tag r20-1b9
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:21:54 +0200 |
parents | 131b0175ea99 |
children |
comparison
equal
deleted
inserted
replaced
113:2ec2fe4a4c89 | 114:8619ce7e4c50 |
---|---|
4 ;; SUMMARY: GNU Emacs V19 button highlighting and flashing support. | 4 ;; SUMMARY: GNU Emacs V19 button highlighting and flashing support. |
5 ;; USAGE: GNU Emacs V19 Lisp Library | 5 ;; USAGE: GNU Emacs V19 Lisp Library |
6 ;; KEYWORDS: faces, hypermedia | 6 ;; KEYWORDS: faces, hypermedia |
7 ;; | 7 ;; |
8 ;; AUTHOR: Bob Weiner | 8 ;; AUTHOR: Bob Weiner |
9 ;; ORG: Brown U. | 9 ;; ORG: InfoDock Associates |
10 ;; | 10 ;; |
11 ;; ORIG-DATE: 21-Aug-92 | 11 ;; ORIG-DATE: 21-Aug-92 |
12 ;; LAST-MOD: 24-Oct-95 at 19:54:59 by Bob Weiner | 12 ;; LAST-MOD: 26-Feb-97 at 01:58:45 by Bob Weiner |
13 ;; | 13 ;; |
14 ;; This file is part of Hyperbole. | 14 ;; This file is part of Hyperbole. |
15 ;; It is for use with GNU Emacs V19. | 15 ;; It is for use with GNU Emacs V19. |
16 ;; Available for use and distribution under the same terms as GNU Emacs. | 16 ;; Available for use and distribution under the same terms as GNU Emacs. |
17 ;; | 17 ;; |
73 (fboundp 'x-display-color-p) | 73 (fboundp 'x-display-color-p) |
74 (fset 'display-color-p 'x-display-color-p)) | 74 (fset 'display-color-p 'x-display-color-p)) |
75 | 75 |
76 (defun hproperty:but-add (start end face) | 76 (defun hproperty:but-add (start end face) |
77 "Add between START and END a button using FACE in current buffer. | 77 "Add between START and END a button using FACE in current buffer. |
78 If 'hproperty:but-emphasize-p' is non-nil when this is called, emphasize that | 78 If `hproperty:but-emphasize-p' is non-nil when this is called, emphasize that |
79 button is selectable whenever the mouse cursor moves over it." | 79 button is selectable whenever the mouse cursor moves over it." |
80 (let ((but (make-overlay start end))) | 80 (let ((but (make-overlay start end))) |
81 (overlay-put but 'face face) | 81 (overlay-put but 'face face) |
82 (if hproperty:but-emphasize-p (overlay-put but 'mouse-face 'highlight)))) | 82 (if hproperty:but-emphasize-p (overlay-put but 'mouse-face 'highlight)))) |
83 | 83 |
104 If END-DELIM is a symbol, e.g. t, then START-DELIM is taken as a regular | 104 If END-DELIM is a symbol, e.g. t, then START-DELIM is taken as a regular |
105 expression which matches an entire button string. | 105 expression which matches an entire button string. |
106 If REGEXP-MATCH is non-nil, only buttons matching this argument are | 106 If REGEXP-MATCH is non-nil, only buttons matching this argument are |
107 highlighted. | 107 highlighted. |
108 | 108 |
109 If 'hproperty:but-emphasize-p' is non-nil when this is called, emphasize that | 109 If `hproperty:but-emphasize-p' is non-nil when this is called, emphasize that |
110 button is selectable whenever the mouse cursor moves over it." | 110 button is selectable whenever the mouse cursor moves over it." |
111 (interactive) | 111 (interactive) |
112 (hproperty:but-clear) | 112 (hproperty:but-clear) |
113 (hproperty:but-create-all start-delim end-delim regexp-match)) | 113 (hproperty:but-create-all start-delim end-delim regexp-match)) |
114 | 114 |