1 @c $Id: tm-util=en.texi,v 3.0 1995/12/25 09:26:20 morioka Exp $
3 @node customize, Bug report, encoded-word, Top
4 @comment node-name, next, previous, up
9 * available functions::
13 @node fields, available functions, customize, customize
14 @comment node-name, next, previous, up
19 tm-view.el and tm-edit.el uses pair of @strong{field-list} and
20 @strong{field-regexp} to display or choose fields of message header.
22 tm has functions to set such pair.
25 @defun tm:add-fields sym field-list &optional regexp-sym
27 It adds @var{field-list} to field-list indicated by symbol @var{sym}.
31 @defun tm:delete-fields sym field-list &optional regexp-sym
33 It removes @var{field-list} from field-list indicated by symbol
38 @node available functions, example, fields, customize
39 @comment node-name, next, previous, up
40 @section available functions
43 @defun add-path path &rest options
45 It adds @var{path} to @code{load-path}.
47 In default, it adds expanded path to top of @code{load-path} if there
48 is @var{path} under @code{default-load-path}.
50 If @code{'all-paths} is specified in @var{options}, it searches
51 @var{path} from all of @code{load-path} instead of
52 only @code{default-load-path}.
54 If @code{'append} is specifies in @var{options}, it adds to end of
59 @defun call-after-loaded module func &optional hook-name
61 It calls function @var{func} if @var{module} is already provided.
63 Otherwise, it add-hooks to @var{hook-name}.
65 Default value of @var{hook-name} is @code{MODULE-load-hook}.
69 @node example, , available functions, customize
70 @comment node-name, next, previous, up
73 @subsection message header display (1)
75 If you would like to hide "Mail-From", "Expires", "Xref", "Approved",
76 "Sender" and "X-.*" headers, please specify:
83 'mime-viewer/ignored-field-list
84 '("Mail-From" "Expires" "Xref" "Approved" "Sender" "X-.*")
88 @subsection message header display (2)
90 If you want to display only "From", ".*To", "Subject", ".*Date" and
91 "Newsgroups" , please specify:
94 (setq mime-viewer/ignored-field-list '(".+"))
95 (setq mime-viewer/visible-field-list
96 '("From" ".*To" "Subject" ".*Date" "Newsgroups"))
102 example to add faces using hilit19.
107 (let* ((csubject-patterns '(("^\\[.+\\]$" nil msg-subject)))
108 (header-patterns '(("^Subject:.*$" nil msg-subject)
109 ("^From:.*$" nil msg-from)
110 ("^--text follows this line--$"
112 ("^[A-Za-z][A-Za-z0-9-]+:" nil msg-header)
114 (body-patterns '(("^\\(In article\\|[ \t]*\\w*[]<>@}|]\\).*$"
116 (message-patterns (append ;;csubject-patterns
120 (hilit-set-mode-patterns 'msg-header header-patterns)
121 (hilit-set-mode-patterns 'msg-body body-patterns)
122 (hilit-set-mode-patterns 'mime/viewer-mode
124 'hilit-rehighlight-message)
126 (add-hook 'mime-viewer/content-header-filter-hook
128 (if (not (eq mime::preview/original-major-mode
129 'gnus-original-article-mode))
130 (hilit-rehighlight-buffer-quietly)
132 (add-hook 'mime-viewer/plain-text-preview-hook
134 (if (not (eq mime::preview/original-major-mode
135 'gnus-original-article-mode))
136 (hilit-rehighlight-buffer-quietly)
142 @subsection browse-url
144 setting example for browse-url.el included in Gnus.
147 (setq browse-url-browser-function
148 (if (eq window-system 'x)
151 (autoload browse-url-browser-function "browse-url"
152 "Ask a WWW browser to show a URL." t)