emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 4cb0bdd: Some cleanup in message.el


From: Mark Oteiza
Subject: [Emacs-diffs] master 4cb0bdd: Some cleanup in message.el
Date: Tue, 8 Aug 2017 14:19:14 -0400 (EDT)

branch: master
commit 4cb0bdd675f0bc3adc130f1f3d037e4d51152396
Author: Mark Oteiza <address@hidden>
Commit: Mark Oteiza <address@hidden>

    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.
---
 lisp/gnus/message.el | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 0f8fdfc..996b0ac 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -2325,7 +2325,7 @@ With prefix-argument just set Follow-Up, don't 
cross-post."
   (setq message-cross-post-old-target target-group))
 
 (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.
 If there have been previous notes, delete them.  TARGET-GROUP specifies the
 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."
       (eq message-mail-alias-type 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.
 This function is intended to be called from `after-change-functions'.
 See also `message-forbidden-properties'."
@@ -4842,17 +4842,13 @@ command evaluates `message-send-mail-hook' just before 
sending a message."
   (run-hooks 'message-send-mail-hook)
   (mailclient-send-it))
 
-(defvar sha1-maximum-internal-length)
-
 (defun message-canlock-generate ()
   "Return a string that is non-trivial to guess.
 Do not use this for anything important, it is cryptographically weak."
-  (require 'sha1)
-  (let (sha1-maximum-internal-length)
-    (sha1 (concat (message-unique-id)
-                 (format "%x%x%x" (random) (random) (random))
-                 (prin1-to-string (recent-keys))
-                 (prin1-to-string (garbage-collect))))))
+  (sha1 (concat (message-unique-id)
+                (format "%x%x%x" (random) (random) (random))
+                (prin1-to-string (recent-keys))
+                (prin1-to-string (garbage-collect)))))
 
 (defvar canlock-password)
 (defvar canlock-password-for-verify)
@@ -5852,7 +5848,7 @@ subscribed address (and not the additional To and Cc 
header contents)."
       (let ((list
             (loop for recipient in recipients
               when (loop for regexp in mft-regexps
-                     when (string-match regexp recipient) return t)
+                     thereis (string-match regexp recipient))
               return recipient)))
        (when list
          (if only-show-subscribed



reply via email to

[Prev in Thread] Current Thread [Next in Thread]