annotate lisp/hyperbole/hsmail.el @ 35:279432d5c479

Added tag r19-15b100 for changeset d620409f5eb8
author cvs
date Mon, 13 Aug 2007 08:53:21 +0200
parents 376386a54a3c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;!emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;; FILE: hsmail.el
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 ;; SUMMARY: Support for Hyperbole buttons in mail composer: mail and mh-letter.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;; USAGE: GNU Emacs Lisp Library
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;; KEYWORDS: hypermedia, mail
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;; AUTHOR: Bob Weiner
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 ;; ORG: Brown U.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;; ORIG-DATE: 9-May-91 at 04:50:20
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;; LAST-MOD: 8-Aug-95 at 10:55:17 by Bob Weiner
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;; This file is part of Hyperbole.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;; Available for use and distribution under the same terms as GNU Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;; Copyright (C) 1991-1995, Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;; Developed with support from Motorola Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;; DESCRIPTION:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 ;; DESCRIP-END.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 ;;; Other required Elisp libraries
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 (require 'sendmail)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 ;;; Public variables
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 (defvar smail:comment '(format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 "Comments: Hyperbole mail buttons accepted, v%s.\n"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 hyperb:version)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 "Default comment form to evaluate and add to outgoing mail.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 Set to the empty string, \"\", for no comment.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 ;;; Used by 'mail-send' in Emacs "sendmail.el".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 (if (boundp 'send-mail-function)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 (or (if (listp send-mail-function)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 (if (equal (nth 2 send-mail-function) '(smail:widen))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 (error
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 "(hsmail): Set 'send-mail-function' to a symbol-name, not a list, before load.")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 (setq send-mail-function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 (list 'lambda nil '(smail:widen) (list send-mail-function))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 (error "(hsmail): Install an Emacs \"sendmail.el\" which includes 'send-mail-function'."))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 (if (fboundp 'mail-prefix-region)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 ;; For compatibility with rsw-modified sendmail.el.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 (defvar mail-yank-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 (function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 (lambda ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 ;; Set off original message.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 (mail-prefix-region (hypb:mark t) (point))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 "*Hook to run mail yank preface function.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 Expects point and mark to be set to the region to preface.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 ;; Else for compatibility with Supercite and Emacs V19.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 ;; If you create your own yank hook, set this variable rather than
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 ;; 'mail-yank-hook' from above.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 (defvar mail-citation-hook nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 "*Hook for modifying a citation just inserted in the mail buffer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 Each hook function can find the citation between (point) and (mark t).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 And each hook function should leave point and mark around the citation
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 text as modified.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 If this hook is entirely empty (nil), a default action is taken
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 instead of no action.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 (defvar mail-yank-hooks '(mail-indent-citation)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 "*Obsolete hook to run mail yank citation function. Use mail-citation-hook instead.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 Expects point and mark to be set to the region to cite."))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 ;; For compatibility with Supercite and Emacs V19.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 (defvar mail-yank-prefix nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 "*Prefix insert on lines of yanked message being replied to.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 nil means use indentation.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 (defvar mail-indentation-spaces 3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 "*Number of spaces to insert at the beginning of each cited line.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 ;;; Public functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 (defun smail:comment-add (&optional comment-form)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 "Adds a comment to the current outgoing message if Hyperbole has been loaded.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 Optional COMMENT-FORM is evaluated to obtain the string to add to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 message. If not given, 'smail:comment' is evaluated by default."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 (let ((comment (eval (or comment-form smail:comment))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 (if (and comment (featurep 'hsite))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 (and (or (search-forward mail-header-separator nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 (if (eq major-mode 'mh-letter-mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 (search-forward "\n--------" nil t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 (not (search-backward comment nil t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 (progn (beginning-of-line) (insert comment)))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 (defun smail:widen ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 "Widens outgoing mail buffer to include Hyperbole button data."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 (if (fboundp 'mail+narrow) (mail+narrow) (widen)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 ;; Overlay this function from V19 "sendmail.el" to work with V18.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 (defun mail-indent-citation ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 "Modify text just inserted from a message to be cited.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 The inserted text should be the region.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 When this function returns, the region is again around the modified text.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 Normally, indent each nonblank line `mail-indentation-spaces' spaces.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 However, if `mail-yank-prefix' is non-nil, insert that prefix on each line."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 (let ((start (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 ;; Don't ever remove headers if user uses Supercite package,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 ;; since he can set an option in that package to do
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 ;; the removal.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 (or (hypb:supercite-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 (mail-yank-clear-headers start (hypb:mark t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 (if (null mail-yank-prefix)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 (indent-rigidly start (hypb:mark t) mail-indentation-spaces)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 (goto-char start)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 (while (< (point) (hypb:mark t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 (insert mail-yank-prefix)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 (forward-line 1))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 ;; Overlay this function from "sendmail.el" to include Hyperbole button
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 ;; data when yanking in a message and to highlight buttons if possible.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 (defun mail-yank-original (arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 "Insert the message being replied to, if any.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 Puts point before the text and mark after.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 Applies 'mail-citation-hook', 'mail-yank-hook' or 'mail-yank-hooks'
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 to text (in decreasing order of precedence).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 Just \\[universal-argument] as argument means don't apply hooks
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 and don't delete any header fields.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 If supercite is in use, header fields are never deleted.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 Use (setq sc-nuke-mail-headers-p t) to have them removed."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 (interactive "P")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 (if mail-reply-buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 (let ((start (point)) opoint)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 (delete-windows-on mail-reply-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 (unwind-protect
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 (set-buffer mail-reply-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 ;; Might be called from newsreader before any
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 ;; Hyperbole mail reader support has been autoloaded.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 (cond ((fboundp 'rmail:msg-widen) (rmail:msg-widen))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 ((eq major-mode 'news-reply-mode) (widen))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 (setq opoint (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 (insert-buffer mail-reply-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 (hmail:msg-narrow)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 (if (fboundp 'hproperty:but-create) (hproperty:but-create))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 (if (consp arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 ;; Don't ever remove headers if user uses Supercite package,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 ;; since he can set an option in that package to do
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 ;; the removal.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 (or (hypb:supercite-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 (mail-yank-clear-headers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 start (marker-position (hypb:mark-marker t))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 (let ((mail-indentation-spaces (if arg (prefix-numeric-value arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 mail-indentation-spaces)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 (cond ((and (boundp 'mail-citation-hook) mail-citation-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 (run-hooks 'mail-citation-hook))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 ((and (boundp 'mail-yank-hook) mail-yank-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 (run-hooks 'mail-yank-hook))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 ((and (boundp 'mail-yank-hooks) mail-yank-hooks)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 (run-hooks 'mail-yank-hooks))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 (t (mail-indent-citation))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 (goto-char (min (point-max) (hypb:mark t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 (set-mark opoint)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 (delete-region (point) ; Remove trailing blank lines.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 (progn (re-search-backward "[^ \^I\^L\n]")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 (point))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 (or (eq major-mode 'news-reply-mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 ;; This is like exchange-point-and-mark, but doesn't activate the mark.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 ;; It is cleaner to avoid activation, even though the command
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 ;; loop would deactivate the mark because we inserted text.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 (goto-char (prog1 (hypb:mark t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 (set-marker (hypb:mark-marker t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 (point) (current-buffer)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 (if (not (eolp)) (insert ?\n))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 (set-buffer mail-reply-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 (hmail:msg-narrow))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 ;;; Private variables
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 ;;; Try to setup comment addition as the first element of these hooks.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 (if (fboundp 'add-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 (add-hook 'mail-setup-hook 'smail:comment-add)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 (add-hook 'mh-letter-mode-hook 'smail:comment-add))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 (var:append 'mail-setup-hook '(smail:comment-add))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 (var:append 'mh-letter-mode-hook '(smail:comment-add)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 (provide 'hsmail)