summaryrefslogtreecommitdiff
path: root/lisp/mail/uce.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-03-11 14:32:42 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2021-03-11 14:32:42 -0500
commitd9c94e93b7013d575aeb2a8e8077564a80b04f7c (patch)
tree0eb0b9d2c5263c1d6a1665e17774b846a802405a /lisp/mail/uce.el
parentb90c658492a2548f183bf072be50f4a57a2b5f0b (diff)
downloademacs-d9c94e93b7013d575aeb2a8e8077564a80b04f7c.tar.gz
emacs-d9c94e93b7013d575aeb2a8e8077564a80b04f7c.tar.bz2
emacs-d9c94e93b7013d575aeb2a8e8077564a80b04f7c.zip
* lisp/mail/: Use lexical-binding
Remove some redundant `:group` args as well. * lisp/mail/supercite.el: Use lexical-binding. (completer-disable): Declare var. (sc-set-variable): Don't rely on dynbind to access `help` variable. * lisp/mail/mail-extr.el: Use lexical-binding. (mail-extract-address-components): Avoid use of dynamic scoping to refer to local vars. * lisp/mail/mailabbrev.el: Use lexical-binding. (mail-abbrev-make-syntax-table): Rename `_` variable to `syntax-_`. * lisp/mail/mailheader.el: Use lexical-binding. (headers): Don't declare as dynbound globally. (mail-header-set, mail-header-merge): Declare `headers` as dynbound locally, instead. Mark those functions as obsolete. (mail-header-format): Use `alist-get` instead of `mail-header`. * lisp/mail/binhex.el (binhex-decode-region-external): Remove always-nil var `firstline`. * lisp/mail/emacsbug.el: Use lexical-binding. (report-emacs-bug): Remove always-nil var `message-end-point`. * lisp/mail/rmail-spam-filter.el: Use lexical-binding. (bbdb/mail_auto_create_p): Declare variable. * lisp/mail/rmail.el (rmail-get-new-mail): Remove always-nil var `delete-files`. * lisp/mail/rmailout.el: Use lexical-binding. (rmail-output-read-file-name): Remove unused var `err`. (rmail-convert-to-babyl-format): Remove unused var `count`. (rmail-output-as-mbox): Remove unused vars `from` and `date`. * lisp/mail/rmailsort.el: Use lexical-binding. (rmail-sort-messages): Remove unused var `msginfo`. * lisp/mail/rfc822.el: Use lexical-binding. * lisp/mail/rmailedit.el: Use lexical-binding. * lisp/mail/mailclient.el: Use lexical-binding. * lisp/mail/blessmail.el: Use lexical-binding. * lisp/mail/mail-hist.el: Use lexical-binding. * lisp/mail/rmailkwd.el: Use lexical-binding. * lisp/mail/rmailmsc.el: Use lexical-binding. * lisp/mail/uce.el: Use lexical-binding. * lisp/mail/unrmail.el: Use lexical-binding.
Diffstat (limited to 'lisp/mail/uce.el')
-rw-r--r--lisp/mail/uce.el27
1 files changed, 10 insertions, 17 deletions
diff --git a/lisp/mail/uce.el b/lisp/mail/uce.el
index a573c8a2673..9ebffef2e59 100644
--- a/lisp/mail/uce.el
+++ b/lisp/mail/uce.el
@@ -1,4 +1,4 @@
-;;; uce.el --- facilitate reply to unsolicited commercial email
+;;; uce.el --- facilitate reply to unsolicited commercial email -*- lexical-binding: t; -*-
;; Copyright (C) 1996, 1998, 2000-2021 Free Software Foundation, Inc.
@@ -127,14 +127,12 @@
"A symbol indicating which mail reader you are using.
Choose from: `gnus', `rmail'."
:type '(choice (const gnus) (const rmail))
- :version "20.3"
- :group 'uce)
+ :version "20.3")
(defcustom uce-setup-hook nil
"Hook to run after UCE rant message is composed.
This hook is run after `mail-setup-hook', which is run as well."
- :type 'hook
- :group 'uce)
+ :type 'hook)
(defcustom uce-message-text
"Recently, I have received an Unsolicited Commercial E-mail from you.
@@ -180,36 +178,31 @@ on beginning of some line from the spamming list. So, when you set it
up, it might be a good idea to actually use this feature.
Value nil means insert no text by default, lets you type it in."
- :type '(choice (const nil) string)
- :group 'uce)
+ :type '(choice (const nil) string))
(defcustom uce-uce-separator
"----- original unsolicited commercial email follows -----"
"Line that will begin quoting of the UCE.
Value nil means use no separator."
- :type '(choice (const nil) string)
- :group 'uce)
+ :type '(choice (const nil) string))
(defcustom uce-signature mail-signature
"Text to put as your signature after the note to UCE sender.
Value nil means none, t means insert `~/.signature' file (if it happens
to exist), if this variable is a string this string will be inserted
as your signature."
- :type '(choice (const nil) (const t) string)
- :group 'uce)
+ :type '(choice (const nil) (const t) string))
(defcustom uce-default-headers
"Errors-To: nobody@localhost\nPrecedence: bulk\n"
"Additional headers to use when responding to a UCE with \\[uce-reply-to-uce].
These are mostly meant for headers that prevent delivery errors reporting."
- :type '(choice (const nil) string)
- :group 'uce)
+ :type '(choice (const nil) string))
(defcustom uce-subject-line
"Spam alert: unsolicited commercial e-mail"
"Subject of the message that will be sent in response to a UCE."
- :type 'string
- :group 'uce)
+ :type 'string)
;; End of user options.
@@ -221,7 +214,7 @@ These are mostly meant for headers that prevent delivery errors reporting."
(declare-function rmail-toggle-header "rmail" (&optional arg))
;;;###autoload
-(defun uce-reply-to-uce (&optional ignored)
+(defun uce-reply-to-uce (&optional _ignored)
"Compose a reply to unsolicited commercial email (UCE).
Sets up a reply buffer addressed to: the sender, his postmaster,
his abuse@ address, and the postmaster of the mail relay used.
@@ -367,7 +360,7 @@ You might need to set `uce-mail-reader' before using this."
;; functions in mail-mode, etc.
(run-hooks 'mail-setup-hook 'uce-setup-hook))))
-(defun uce-insert-ranting (&optional ignored)
+(defun uce-insert-ranting (&optional _ignored)
"Insert text of the usual reply to UCE into current buffer."
(interactive "P")
(insert uce-message-text))