tm 6.78.
[elisp/tm.git] / tm-def.el
1 ;;;
2 ;;; $Id: tm-def.el,v 4.1 1995/09/04 10:17:02 morioka Exp $
3 ;;;
4
5 ;;; @ variables
6 ;;;
7
8 (defvar mime/tmp-dir (or (getenv "TM_TMPDIR") "/tmp/"))
9
10
11 ;;; @ compatible module among Mule, NEmacs and NEpoch 
12 ;;;
13
14 (cond ((boundp 'MULE)  (require 'tm-mule))
15       ((boundp 'NEMACS)(require 'tm-nemacs))
16       (t               (require 'tm-orig))
17       )
18
19
20 ;;; @ definitions about MIME
21 ;;;
22
23 (defconst mime/tspecials "][\000-\040()<>@,\;:\\\"/?.=")
24 (defconst mime/token-regexp (concat "[^" mime/tspecials "]+"))
25 (defconst mime/charset-regexp mime/token-regexp)
26
27
28 ;;; @@ Base64
29 ;;;
30
31 (defconst base64-token-regexp "[A-Za-z0-9+/=]")
32
33 (defconst mime/B-encoded-text-regexp
34   (concat "\\("
35           base64-token-regexp
36           base64-token-regexp
37           base64-token-regexp
38           base64-token-regexp
39           "\\)+"))
40 (defconst mime/B-encoding-and-encoded-text-regexp
41   (concat "\\(B\\)\\?" mime/B-encoded-text-regexp))
42
43
44 ;;; @@ Quoted-Printable
45 ;;;
46
47 (defconst quoted-printable-hex-chars "0123456789ABCDEF")
48 (defconst quoted-printable-octet-regexp
49   (concat "=[" quoted-printable-hex-chars
50           "][" quoted-printable-hex-chars "]"))
51
52 (defconst mime/Q-encoded-text-regexp
53   (concat "\\([^=?]\\|" quoted-printable-octet-regexp "\\)+"))
54 (defconst mime/Q-encoding-and-encoded-text-regexp
55   (concat "\\(Q\\)\\?" mime/Q-encoded-text-regexp))
56
57
58 ;;; @ end
59 ;;;
60
61 (provide 'tm-def)