Mercurial > hg > xemacs-beta
comparison lisp/tm/tm-def.el @ 120:cca96a509cfe r20-1b12
Import from CVS: tag r20-1b12
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:25:29 +0200 |
parents | fe104dbd9147 |
children |
comparison
equal
deleted
inserted
replaced
119:d101af7320b8 | 120:cca96a509cfe |
---|---|
1 ;;; tm-def.el --- definition module for tm | 1 ;;; tm-def.el --- definition module for tm |
2 | 2 |
3 ;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> | 5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> |
6 ;; Version: $Id: tm-def.el,v 1.5 1997/03/16 03:05:46 steve Exp $ | 6 ;; Version: $Id: tm-def.el,v 1.6 1997/04/10 05:55:52 steve Exp $ |
7 ;; Keywords: mail, news, MIME, multimedia, definition | 7 ;; Keywords: mail, news, MIME, multimedia, definition |
8 | 8 |
9 ;; This file is part of tm (Tools for MIME). | 9 ;; This file is part of tm (Tools for MIME). |
10 | 10 |
11 ;; This program is free software; you can redistribute it and/or | 11 ;; This program is free software; you can redistribute it and/or |
98 | 98 |
99 ;;; @ button | 99 ;;; @ button |
100 ;;; | 100 ;;; |
101 | 101 |
102 (defun tm:set-face-region (b e face) | 102 (defun tm:set-face-region (b e face) |
103 (let ((overlay (tl:make-overlay b e))) | 103 (let ((overlay (make-overlay b e))) |
104 (tl:overlay-put overlay 'face face) | 104 (overlay-put overlay 'face face) |
105 )) | 105 )) |
106 | 106 |
107 (defvar tm:button-face 'bold | 107 (defvar tm:button-face 'bold |
108 "Face used for content-button or URL-button of MIME-Preview buffer. | 108 "Face used for content-button or URL-button of MIME-Preview buffer. |
109 \[tm-def.el]") | 109 \[tm-def.el]") |
115 "Face used for invalid encoded-word.") | 115 "Face used for invalid encoded-word.") |
116 | 116 |
117 (defun tm:add-button (from to func &optional data) | 117 (defun tm:add-button (from to func &optional data) |
118 "Create a button between FROM and TO with callback FUNC and data DATA." | 118 "Create a button between FROM and TO with callback FUNC and data DATA." |
119 (and tm:button-face | 119 (and tm:button-face |
120 (tl:overlay-put (tl:make-overlay from to) 'face tm:button-face)) | 120 (overlay-put (make-overlay from to) 'face tm:button-face)) |
121 (add-text-properties from to | 121 (add-text-properties from to |
122 (append (and tm:mouse-face | 122 (append (and tm:mouse-face |
123 (list 'mouse-face tm:mouse-face)) | 123 (list 'mouse-face tm:mouse-face)) |
124 (list 'tm-callback func) | 124 (list 'tm-callback func) |
125 (and data (list 'tm-data data)) | 125 (and data (list 'tm-data data)) |