Commit 4cb0bdd6 authored by Mark Oteiza's avatar Mark Oteiza
Browse files

Some cleanup in message.el

* lisp/gnus/message.el (message-cross-post-insert-note):
(message-strip-forbidden-properties): Mark unused args.
(message-canlock-generate): Remove extinct variable
sha1-maximum-internal-length.
(message-make-mail-followup-to): Use loop's thereis clause.
parent 7d1115e0
...@@ -2325,7 +2325,7 @@ With prefix-argument just set Follow-Up, don't cross-post." ...@@ -2325,7 +2325,7 @@ With prefix-argument just set Follow-Up, don't cross-post."
(setq message-cross-post-old-target target-group)) (setq message-cross-post-old-target target-group))
(defun message-cross-post-insert-note (target-group cross-post in-old (defun message-cross-post-insert-note (target-group cross-post in-old
old-groups) _old-groups)
"Insert a in message body note about a set Followup or Crosspost. "Insert a in message body note about a set Followup or Crosspost.
If there have been previous notes, delete them. TARGET-GROUP specifies the If there have been previous notes, delete them. TARGET-GROUP specifies the
group to Followup-To. When CROSS-POST is t, insert note about group to Followup-To. When CROSS-POST is t, insert note about
...@@ -2843,7 +2843,7 @@ These properties are essential to work, so we should never strip them." ...@@ -2843,7 +2843,7 @@ These properties are essential to work, so we should never strip them."
(eq message-mail-alias-type type) (eq message-mail-alias-type type)
(memq type message-mail-alias-type))) (memq type message-mail-alias-type)))
(defun message-strip-forbidden-properties (begin end &optional old-length) (defun message-strip-forbidden-properties (begin end &optional _old-length)
"Strip forbidden properties between BEGIN and END, ignoring the third arg. "Strip forbidden properties between BEGIN and END, ignoring the third arg.
This function is intended to be called from `after-change-functions'. This function is intended to be called from `after-change-functions'.
See also `message-forbidden-properties'." See also `message-forbidden-properties'."
...@@ -4842,17 +4842,13 @@ command evaluates `message-send-mail-hook' just before sending a message." ...@@ -4842,17 +4842,13 @@ command evaluates `message-send-mail-hook' just before sending a message."
(run-hooks 'message-send-mail-hook) (run-hooks 'message-send-mail-hook)
(mailclient-send-it)) (mailclient-send-it))
(defvar sha1-maximum-internal-length)
(defun message-canlock-generate () (defun message-canlock-generate ()
"Return a string that is non-trivial to guess. "Return a string that is non-trivial to guess.
Do not use this for anything important, it is cryptographically weak." Do not use this for anything important, it is cryptographically weak."
(require 'sha1)
(let (sha1-maximum-internal-length)
(sha1 (concat (message-unique-id) (sha1 (concat (message-unique-id)
(format "%x%x%x" (random) (random) (random)) (format "%x%x%x" (random) (random) (random))
(prin1-to-string (recent-keys)) (prin1-to-string (recent-keys))
(prin1-to-string (garbage-collect)))))) (prin1-to-string (garbage-collect)))))
(defvar canlock-password) (defvar canlock-password)
(defvar canlock-password-for-verify) (defvar canlock-password-for-verify)
...@@ -5852,7 +5848,7 @@ subscribed address (and not the additional To and Cc header contents)." ...@@ -5852,7 +5848,7 @@ subscribed address (and not the additional To and Cc header contents)."
(let ((list (let ((list
(loop for recipient in recipients (loop for recipient in recipients
when (loop for regexp in mft-regexps when (loop for regexp in mft-regexps
when (string-match regexp recipient) return t) thereis (string-match regexp recipient))
return recipient))) return recipient)))
(when list (when list
(if only-show-subscribed (if only-show-subscribed
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment