+2001-11-07 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * message.el: Always require canlock.
+ (message-ignored-supersedes-headers): Include Cancel-Lock and
+ Cancel-Key.
+ (message-insert-canlock): Don't require canlock.
+ (message-cancel-news): Don't check whether canlock is available.
+ (message-supersede): Support cancel-locks.
+
+ * gnus-art.el: Don't autoload canlock.
+
2001-11-06 18:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
* mail-source.el (mail-source-fetch-imap): ASYNC param.
;;; Code:
(eval-when-compile
- (require 'canlock)
(require 'cl)
(defvar gnus-list-identifiers)) ; gnus-sum is required where necessary
+(require 'canlock)
(require 'mailheader)
(require 'nnheader)
;; This is apparently necessary even though things are autoloaded:
:group 'message-headers
:type 'regexp)
-(defcustom message-ignored-supersedes-headers "^Path:\\|^Date\\|^NNTP-Posting-Host:\\|^Xref:\\|^Lines:\\|^Received:\\|^X-From-Line:\\|^X-Trace:\\|^X-Complaints-To:\\|Return-Path:\\|^Supersedes:\\|^NNTP-Posting-Date:\\|^X-Trace:\\|^X-Complaints-To:"
+(defcustom message-ignored-supersedes-headers "^Path:\\|^Date\\|^NNTP-Posting-Host:\\|^Xref:\\|^Lines:\\|^Received:\\|^X-From-Line:\\|^X-Trace:\\|^X-Complaints-To:\\|Return-Path:\\|^Supersedes:\\|^NNTP-Posting-Date:\\|^X-Trace:\\|^X-Complaints-To:\\|^Cancel-Lock:\\|^Cancel-Key:"
"*Header lines matching this regexp will be deleted before posting.
It's best to delete old Path and Date headers before posting to avoid
any confusion."
(defun message-insert-canlock ()
(when message-insert-canlock
- (require 'canlock)
(message-canlock-password)
(canlock-insert-header)))
;; <abraham@dina.kvl.dk>
;;
;; IF article has cancel-lock THEN
- ;; IF we can load canlock THEN
- ;; IF we can verify it THEN
- ;; issue cancel
- ;; ELSE
- ;; error: cancellock: article is not yours
+ ;; IF we can verify it THEN
+ ;; issue cancel
;; ELSE
- ;; error: message is cancel locked
+ ;; error: cancellock: article is not yours
;; ELSE
;; Use old rules, comparing sender...
(if (message-fetch-field "Cancel-Lock")
- (if (ignore-errors (require 'canlock))
- (if (null (canlock-verify))
- t
- (error "Failed to verify Cancel-lock: This article is not yours"))
- (error "This article is cancel locked, the `canlock.el' library is required."))
+ (if (null (canlock-verify))
+ t
+ (error "Failed to verify Cancel-lock: This article is not yours"))
nil)
(message-gnksa-enable-p 'cancel-messages)
(and sender
(sender (message-fetch-field "sender"))
(from (message-fetch-field "from")))
;; Check whether the user owns the article that is to be superseded.
- (unless (or (message-gnksa-enable-p 'cancel-messages)
+ (unless (or
+ ;; Canlock-logic as suggested by Per Abrahamsen
+ ;; <abraham@dina.kvl.dk>
+ ;;
+ ;; IF article has cancel-lock THEN
+ ;; IF we can verify it THEN
+ ;; issue cancel
+ ;; ELSE
+ ;; error: cancellock: article is not yours
+ ;; ELSE
+ ;; Use old rules, comparing sender...
+ (if (message-fetch-field "Cancel-Lock")
+ (if (null (canlock-verify))
+ t
+ (error "Failed to verify Cancel-lock: This article is not yours"))
+ nil)
+ (message-gnksa-enable-p 'cancel-messages)
(and sender
(string-equal
(downcase sender)