Mercurial > emacs
comparison lisp/gnus/mml-sec.el @ 70245:322c5c5027dc
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-249
Merge from gnus--rel--5.10
Patches applied:
* gnus--rel--5.10 (patch 91-95)
- Merge from emacs--devo--0
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 26 Apr 2006 21:58:05 +0000 |
parents | 1077b8039c32 |
children | e3694f1cb928 |
comparison
equal
deleted
inserted
replaced
70244:ccd02e1ca0e3 | 70245:322c5c5027dc |
---|---|
186 (goto-char (match-end 0)) | 186 (goto-char (match-end 0)) |
187 (apply 'mml-insert-tag 'part (cons (if sign 'sign 'encrypt) | 187 (apply 'mml-insert-tag 'part (cons (if sign 'sign 'encrypt) |
188 (cons method tags)))) | 188 (cons method tags)))) |
189 (t (error "The message is corrupted. No mail header separator")))))) | 189 (t (error "The message is corrupted. No mail header separator")))))) |
190 | 190 |
191 (defvar mml-secure-method | |
192 (if (equal mml-default-encrypt-method mml-default-sign-method) | |
193 mml-default-sign-method | |
194 "pgpmime") | |
195 "Current security method. Internal variable.") | |
196 | |
197 (defun mml-secure-sign (&optional method) | |
198 "Add MML tags to sign this MML part. | |
199 Use METHOD if given. Else use `mml-secure-method' or | |
200 `mml-default-sign-method'." | |
201 (interactive) | |
202 (mml-secure-part | |
203 (or method mml-secure-method mml-default-sign-method) | |
204 'sign)) | |
205 | |
206 (defun mml-secure-encrypt (&optional method) | |
207 "Add MML tags to encrypt this MML part. | |
208 Use METHOD if given. Else use `mml-secure-method' or | |
209 `mml-default-sign-method'." | |
210 (interactive) | |
211 (mml-secure-part | |
212 (or method mml-secure-method mml-default-sign-method))) | |
213 | |
191 (defun mml-secure-sign-pgp () | 214 (defun mml-secure-sign-pgp () |
192 "Add MML tags to PGP sign this MML part." | 215 "Add MML tags to PGP sign this MML part." |
193 (interactive) | 216 (interactive) |
194 (mml-secure-part "pgp" 'sign)) | 217 (mml-secure-part "pgp" 'sign)) |
195 | 218 |
247 (save-excursion | 270 (save-excursion |
248 (goto-char (point-max)) | 271 (goto-char (point-max)) |
249 (when (re-search-backward "^<#secure.*>\n" nil t) | 272 (when (re-search-backward "^<#secure.*>\n" nil t) |
250 (delete-region (match-beginning 0) (match-end 0))))) | 273 (delete-region (match-beginning 0) (match-end 0))))) |
251 | 274 |
275 | |
276 (defun mml-secure-message-sign (&optional method) | |
277 "Add MML tags to sign this MML part. | |
278 Use METHOD if given. Else use `mml-secure-method' or | |
279 `mml-default-sign-method'." | |
280 (interactive) | |
281 (mml-secure-part | |
282 (or method mml-secure-method mml-default-sign-method) | |
283 'sign)) | |
284 | |
285 (defun mml-secure-message-sign-encrypt (&optional method) | |
286 "Add MML tag to sign and encrypt the entire message. | |
287 Use METHOD if given. Else use `mml-secure-method' or | |
288 `mml-default-sign-method'." | |
289 (interactive) | |
290 (mml-secure-message | |
291 (or method mml-secure-method mml-default-sign-method) | |
292 'signencrypt)) | |
293 | |
294 (defun mml-secure-message-encrypt (&optional method) | |
295 "Add MML tag to encrypt the entire message. | |
296 Use METHOD if given. Else use `mml-secure-method' or | |
297 `mml-default-sign-method'." | |
298 (interactive) | |
299 (mml-secure-message | |
300 (or method mml-secure-method mml-default-sign-method) | |
301 'encrypt)) | |
302 | |
252 (defun mml-secure-message-sign-smime () | 303 (defun mml-secure-message-sign-smime () |
253 "Add MML tag to encrypt/sign the entire message." | 304 "Add MML tag to encrypt/sign the entire message." |
254 (interactive) | 305 (interactive) |
255 (mml-secure-message "smime" 'sign)) | 306 (mml-secure-message "smime" 'sign)) |
256 | 307 |