mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-24 19:03:29 +00:00
* 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.
This commit is contained in:
parent
b90c658492
commit
d9c94e93b7
@ -38,19 +38,16 @@
|
||||
"Non-nil value should be a string that names a binhex decoder.
|
||||
The program should expect to read binhex data on its standard
|
||||
input and write the converted data to its standard output."
|
||||
:type 'string
|
||||
:group 'binhex)
|
||||
:type 'string)
|
||||
|
||||
(defcustom binhex-decoder-switches '("-d")
|
||||
"List of command line flags passed to the command `binhex-decoder-program'."
|
||||
:group 'binhex
|
||||
:type '(repeat string))
|
||||
|
||||
(defcustom binhex-use-external
|
||||
(executable-find binhex-decoder-program)
|
||||
"Use external binhex program."
|
||||
:version "22.1"
|
||||
:group 'binhex
|
||||
:type 'boolean)
|
||||
|
||||
(defconst binhex-alphabet-decoding-alist
|
||||
@ -80,7 +77,7 @@ input and write the converted data to its standard output."
|
||||
(make-obsolete-variable 'binhex-temporary-file-directory
|
||||
'temporary-file-directory "28.1")
|
||||
|
||||
(defun binhex-insert-char (char &optional count ignored buffer)
|
||||
(defun binhex-insert-char (char &optional count _ignored buffer)
|
||||
"Insert COUNT copies of CHARACTER into BUFFER."
|
||||
(if (or (null buffer) (eq buffer (current-buffer)))
|
||||
(insert-char char count)
|
||||
@ -273,7 +270,8 @@ If HEADER-ONLY is non-nil only decode header and return filename."
|
||||
(defun binhex-decode-region-external (start end)
|
||||
"Binhex decode region between START and END using external decoder."
|
||||
(interactive "r")
|
||||
(let ((cbuf (current-buffer)) firstline work-buffer
|
||||
(let ((cbuf (current-buffer))
|
||||
work-buffer ;; firstline
|
||||
(file-name (expand-file-name
|
||||
(concat (binhex-decode-region-internal start end t)
|
||||
".data")
|
||||
@ -287,9 +285,9 @@ If HEADER-ONLY is non-nil only decode header and return filename."
|
||||
(set-buffer (setq work-buffer
|
||||
(generate-new-buffer " *binhex-work*")))
|
||||
(buffer-disable-undo work-buffer)
|
||||
(insert-buffer-substring cbuf firstline end)
|
||||
(insert-buffer-substring cbuf nil end) ;; firstline
|
||||
(cd temporary-file-directory)
|
||||
(apply 'call-process-region
|
||||
(apply #'call-process-region
|
||||
(point-min)
|
||||
(point-max)
|
||||
binhex-decoder-program
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; blessmail.el --- decide whether movemail needs special privileges -*- no-byte-compile: t -*-
|
||||
;;; blessmail.el --- decide whether movemail needs special privileges -*- no-byte-compile: t; lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1994, 2001-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list
|
||||
;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1985, 1994, 1997-1998, 2000-2021 Free Software
|
||||
;; Foundation, Inc.
|
||||
@ -45,12 +45,10 @@
|
||||
|
||||
(defcustom report-emacs-bug-no-confirmation nil
|
||||
"If non-nil, suppress the confirmations asked for the sake of novice users."
|
||||
:group 'emacsbug
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom report-emacs-bug-no-explanations nil
|
||||
"If non-nil, suppress the explanations given for the sake of novice users."
|
||||
:group 'emacsbug
|
||||
:type 'boolean)
|
||||
|
||||
;; User options end here.
|
||||
@ -204,7 +202,7 @@ This requires either the macOS \"open\" command, or the freedesktop
|
||||
(defvar message-sendmail-envelope-from)
|
||||
|
||||
;;;###autoload
|
||||
(defun report-emacs-bug (topic &optional unused)
|
||||
(defun report-emacs-bug (topic &optional _unused)
|
||||
"Report a bug in GNU Emacs.
|
||||
Prompts for bug subject. Leaves you in a mail buffer.
|
||||
|
||||
@ -219,10 +217,10 @@ Already submitted bugs can be found in the Emacs bug tracker:
|
||||
(let ((from-buffer (current-buffer))
|
||||
(can-insert-mail (or (report-emacs-bug-can-use-xdg-email)
|
||||
(report-emacs-bug-can-use-osx-open)))
|
||||
user-point message-end-point)
|
||||
(setq message-end-point
|
||||
(with-current-buffer (messages-buffer)
|
||||
(point-max-marker)))
|
||||
user-point) ;; message-end-point
|
||||
;; (setq message-end-point
|
||||
;; (with-current-buffer (messages-buffer)
|
||||
;; (point-max-marker)))
|
||||
(condition-case nil
|
||||
;; For the novice user make sure there's always enough space for
|
||||
;; the mail and the warnings buffer on this frame (Bug#10873).
|
||||
@ -263,7 +261,7 @@ Already submitted bugs can be found in the Emacs bug tracker:
|
||||
"Bug-GNU-Emacs"
|
||||
'face 'link
|
||||
'help-echo (concat "mouse-2, RET: Follow this link")
|
||||
'action (lambda (button)
|
||||
'action (lambda (_button)
|
||||
(browse-url "https://lists.gnu.org/r/bug-gnu-emacs/"))
|
||||
'follow-link t)
|
||||
(insert " mailing list\nand the GNU bug tracker at ")
|
||||
@ -271,7 +269,7 @@ Already submitted bugs can be found in the Emacs bug tracker:
|
||||
"debbugs.gnu.org"
|
||||
'face 'link
|
||||
'help-echo (concat "mouse-2, RET: Follow this link")
|
||||
'action (lambda (button)
|
||||
'action (lambda (_button)
|
||||
(browse-url "https://debbugs.gnu.org/cgi/pkgreport.cgi?package=emacs;max-bugs=100;base-order=1;bug-rev=1"))
|
||||
'follow-link t)
|
||||
|
||||
@ -347,10 +345,10 @@ usually do not have translators for other languages.\n\n")))
|
||||
|
||||
;; This is so the user has to type something in order to send easily.
|
||||
(use-local-map (nconc (make-sparse-keymap) (current-local-map)))
|
||||
(define-key (current-local-map) "\C-c\C-i" 'info-emacs-bug)
|
||||
(define-key (current-local-map) "\C-c\C-i" #'info-emacs-bug)
|
||||
(if can-insert-mail
|
||||
(define-key (current-local-map) "\C-c\M-i"
|
||||
'report-emacs-bug-insert-to-mailer))
|
||||
#'report-emacs-bug-insert-to-mailer))
|
||||
(setq report-emacs-bug-send-command (get mail-user-agent 'sendfunc)
|
||||
report-emacs-bug-send-hook (get mail-user-agent 'hookvar))
|
||||
(if report-emacs-bug-send-command
|
||||
@ -376,7 +374,7 @@ usually do not have translators for other languages.\n\n")))
|
||||
(shrink-window-if-larger-than-buffer (get-buffer-window "*Bug Help*")))
|
||||
;; Make it less likely people will send empty messages.
|
||||
(if report-emacs-bug-send-hook
|
||||
(add-hook report-emacs-bug-send-hook 'report-emacs-bug-hook nil t))
|
||||
(add-hook report-emacs-bug-send-hook #'report-emacs-bug-hook nil t))
|
||||
(goto-char (point-max))
|
||||
(skip-chars-backward " \t\n")
|
||||
(setq-local report-emacs-bug-orig-text
|
||||
@ -398,7 +396,7 @@ usually do not have translators for other languages.\n\n")))
|
||||
;; This is used not only for X11 but also W32 and others.
|
||||
(insert "Windowing system distributor '" (x-server-vendor)
|
||||
"', version "
|
||||
(mapconcat 'number-to-string (x-server-version) ".") "\n")
|
||||
(mapconcat #'number-to-string (x-server-version) ".") "\n")
|
||||
(error t)))
|
||||
(let ((os (ignore-errors (report-emacs-bug--os-description))))
|
||||
(if (stringp os)
|
||||
@ -409,7 +407,7 @@ usually do not have translators for other languages.\n\n")))
|
||||
system-configuration-options "'\n\n")
|
||||
(fill-region (line-beginning-position -1) (point))))
|
||||
|
||||
(define-obsolete-function-alias 'report-emacs-bug-info 'info-emacs-bug "24.3")
|
||||
(define-obsolete-function-alias 'report-emacs-bug-info #'info-emacs-bug "24.3")
|
||||
|
||||
(defun report-emacs-bug-hook ()
|
||||
"Do some checking before sending a bug report."
|
||||
|
@ -1381,7 +1381,7 @@ It shows the simple addresses and gets a confirmation. Use as:
|
||||
(save-window-excursion
|
||||
(display-buffer (set-buffer (get-buffer-create " F-C-A-H-E")))
|
||||
(erase-buffer)
|
||||
(insert (mapconcat 'identity feedmail-address-list " "))
|
||||
(insert (mapconcat #'identity feedmail-address-list " "))
|
||||
(if (not (y-or-n-p "How do you like them apples? "))
|
||||
(error "FQM: Sending...gave up in last chance hook"))))
|
||||
|
||||
@ -1592,10 +1592,10 @@ Feeds the buffer to it."
|
||||
(feedmail-say-debug ">in-> feedmail-buffer-to-binmail %s" addr-listoid)
|
||||
(set-buffer prepped)
|
||||
(apply
|
||||
'call-process-region
|
||||
#'call-process-region
|
||||
(append (list (point-min) (point-max) "/bin/sh" nil errors-to nil "-c"
|
||||
(format feedmail-binmail-template
|
||||
(mapconcat 'identity addr-listoid " "))))))
|
||||
(mapconcat #'identity addr-listoid " "))))))
|
||||
|
||||
|
||||
(defvar sendmail-program)
|
||||
@ -1609,7 +1609,7 @@ local gurus."
|
||||
(require 'sendmail)
|
||||
(feedmail-say-debug ">in-> feedmail-buffer-to-sendmail %s" addr-listoid)
|
||||
(set-buffer prepped)
|
||||
(apply 'call-process-region
|
||||
(apply #'call-process-region
|
||||
(append (list (point-min) (point-max) sendmail-program
|
||||
nil errors-to nil "-oi" "-t")
|
||||
;; provide envelope "from" to sendmail; results will vary
|
||||
@ -2042,7 +2042,7 @@ backup file names and the like)."
|
||||
(message "FQM: Trapped `%s', message left in queue." (car signal-stuff))
|
||||
(sit-for 3)
|
||||
(message "FQM: Trap details: \"%s\""
|
||||
(mapconcat 'identity (cdr signal-stuff) "\" \""))
|
||||
(mapconcat #'identity (cdr signal-stuff) "\" \""))
|
||||
(sit-for 3)))
|
||||
(kill-buffer blobby-buffer)
|
||||
(feedmail-say-chatter
|
||||
|
@ -81,7 +81,7 @@ RFC 2646 suggests 66 characters for readability."
|
||||
(while (setq end (text-property-any start (point-max) 'hard 't))
|
||||
(save-restriction
|
||||
(narrow-to-region start end)
|
||||
(let ((fill-column (eval fill-flowed-encode-column)))
|
||||
(let ((fill-column (eval fill-flowed-encode-column t)))
|
||||
(fill-flowed-fill-buffer))
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "\n" nil t)
|
||||
@ -119,7 +119,7 @@ If BUFFER is nil, default to the current buffer.
|
||||
If DELETE-SPACE, delete RFC2646 spaces padding at the end of
|
||||
lines."
|
||||
(with-current-buffer (or buffer (current-buffer))
|
||||
(let ((fill-column (eval fill-flowed-display-column)))
|
||||
(let ((fill-column (eval fill-flowed-display-column t)))
|
||||
(goto-char (point-min))
|
||||
(while (not (eobp))
|
||||
(cond
|
||||
|
@ -232,13 +232,13 @@ If DECODE, the DISPLAY-NAME will have RFC2047 decoding performed
|
||||
;; If we found no display-name, then we look for comments.
|
||||
(if display-name
|
||||
(setq display-string
|
||||
(mapconcat 'identity (reverse display-name) " "))
|
||||
(mapconcat #'identity (reverse display-name) " "))
|
||||
(setq display-string (ietf-drums-get-comment string)))
|
||||
(if (not mailbox)
|
||||
(when (and display-string
|
||||
(string-match "@" display-string))
|
||||
(cons
|
||||
(mapconcat 'identity (nreverse display-name) "")
|
||||
(mapconcat #'identity (nreverse display-name) "")
|
||||
(ietf-drums-get-comment string)))
|
||||
(cons mailbox (if decode
|
||||
(rfc2047-decode-string display-string)
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; mail-extr.el --- extract full name and address from email header
|
||||
;;; mail-extr.el --- extract full name and address from email header -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1991-1994, 1997, 2001-2021 Free Software Foundation,
|
||||
;; Inc.
|
||||
@ -222,23 +222,20 @@
|
||||
"Whether to try to guess middle initial from mail address.
|
||||
If true, then when we see an address like \"John Smith <jqs@host.com>\"
|
||||
we will assume that \"John Q. Smith\" is the fellow's name."
|
||||
:type 'boolean
|
||||
:group 'mail-extr)
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom mail-extr-ignore-single-names nil
|
||||
"Whether to ignore a name that is just a single word.
|
||||
If true, then when we see an address like \"Idiot <dumb@stupid.com>\"
|
||||
we will act as though we couldn't find a full name in the address."
|
||||
:type 'boolean
|
||||
:version "22.1"
|
||||
:group 'mail-extr)
|
||||
:version "22.1")
|
||||
|
||||
(defcustom mail-extr-ignore-realname-equals-mailbox-name t
|
||||
"Whether to ignore a name that is equal to the mailbox name.
|
||||
If true, then when the address is like \"Single <single@address.com>\"
|
||||
we will act as though we couldn't find a full name in the address."
|
||||
:type 'boolean
|
||||
:group 'mail-extr)
|
||||
:type 'boolean)
|
||||
|
||||
;; Matches a leading title that is not part of the name (does not
|
||||
;; contribute to uniquely identifying the person).
|
||||
@ -248,19 +245,16 @@ we will act as though we couldn't find a full name in the address."
|
||||
"Matches prefixes to the full name that identify a person's position.
|
||||
These are stripped from the full name because they do not contribute to
|
||||
uniquely identifying the person."
|
||||
:type 'regexp
|
||||
:group 'mail-extr)
|
||||
:type 'regexp)
|
||||
|
||||
(defcustom mail-extr-@-binds-tighter-than-! nil
|
||||
"Whether the local mail transport agent looks at ! before @."
|
||||
:type 'boolean
|
||||
:group 'mail-extr)
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom mail-extr-mangle-uucp nil
|
||||
"Whether to throw away information in UUCP addresses
|
||||
by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\"."
|
||||
:type 'boolean
|
||||
:group 'mail-extr)
|
||||
:type 'boolean)
|
||||
|
||||
;;----------------------------------------------------------------------
|
||||
;; what orderings are meaningful?????
|
||||
@ -760,7 +754,6 @@ non-display use, you should probably use
|
||||
end-of-address
|
||||
<-pos >-pos @-pos colon-pos comma-pos !-pos %-pos \;-pos
|
||||
group-:-pos group-\;-pos route-addr-:-pos
|
||||
record-pos-symbol
|
||||
first-real-pos last-real-pos
|
||||
phrase-beg phrase-end
|
||||
;; Dynamically set in mail-extr-voodoo.
|
||||
@ -852,13 +845,16 @@ non-display use, you should probably use
|
||||
)
|
||||
;; record the position of various interesting chars, determine
|
||||
;; validity later.
|
||||
((setq record-pos-symbol
|
||||
(cdr (assq char
|
||||
'((?< . <-pos) (?> . >-pos) (?@ . @-pos)
|
||||
(?: . colon-pos) (?, . comma-pos) (?! . !-pos)
|
||||
(?% . %-pos) (?\; . \;-pos)))))
|
||||
(set record-pos-symbol
|
||||
(cons (point) (symbol-value record-pos-symbol)))
|
||||
((memq char '(?< ?> ?@ ?: ?, ?! ?% ?\;))
|
||||
(push (point) (pcase-exhaustive char
|
||||
(?< <-pos)
|
||||
(?> >-pos)
|
||||
(?@ @-pos)
|
||||
(?: colon-pos)
|
||||
(?, comma-pos)
|
||||
(?! !-pos)
|
||||
(?% %-pos)
|
||||
(?\; \;-pos)))
|
||||
(forward-char 1))
|
||||
((eq char ?.)
|
||||
(forward-char 1))
|
||||
@ -1065,7 +1061,7 @@ non-display use, you should probably use
|
||||
(mail-extr-demarkerize route-addr-:-pos)
|
||||
(setq route-addr-:-pos nil
|
||||
>-pos (mail-extr-demarkerize >-pos)
|
||||
%-pos (mapcar 'mail-extr-demarkerize %-pos)))
|
||||
%-pos (mapcar #'mail-extr-demarkerize %-pos)))
|
||||
|
||||
;; de-listify @-pos
|
||||
(setq @-pos (car @-pos))
|
||||
@ -1122,7 +1118,7 @@ non-display use, you should probably use
|
||||
(setq insert-point (point-max)))
|
||||
(%-pos
|
||||
(setq insert-point (car (last %-pos))
|
||||
saved-%-pos (mapcar 'mail-extr-markerize %-pos)
|
||||
saved-%-pos (mapcar #'mail-extr-markerize %-pos)
|
||||
%-pos nil
|
||||
@-pos (mail-extr-markerize @-pos)))
|
||||
(@-pos
|
||||
@ -1162,7 +1158,7 @@ non-display use, you should probably use
|
||||
"uucp"))
|
||||
(setq !-pos (cdr !-pos))))
|
||||
(and saved-%-pos
|
||||
(setq %-pos (append (mapcar 'mail-extr-demarkerize
|
||||
(setq %-pos (append (mapcar #'mail-extr-demarkerize
|
||||
saved-%-pos)
|
||||
%-pos)))
|
||||
(setq @-pos (mail-extr-demarkerize @-pos))
|
||||
@ -1461,8 +1457,7 @@ If it is neither nil nor a string, modifying of names will never take
|
||||
place. It affects how `mail-extract-address-components' works."
|
||||
:type '(choice (regexp :size 0)
|
||||
(const :tag "Always enabled" nil)
|
||||
(const :tag "Always disabled" t))
|
||||
:group 'mail-extr)
|
||||
(const :tag "Always disabled" t)))
|
||||
|
||||
(defun mail-extr-voodoo (mbox-beg mbox-end canonicalization-buffer)
|
||||
(unless (and mail-extr-disable-voodoo
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; mail-hist.el --- headers and message body history for outgoing mail
|
||||
;;; mail-hist.el --- headers and message body history for outgoing mail -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1994, 2001-2021 Free Software Foundation, Inc.
|
||||
|
||||
@ -69,8 +69,8 @@
|
||||
|
||||
;;;###autoload
|
||||
(defun mail-hist-enable ()
|
||||
(add-hook 'mail-mode-hook 'mail-hist-define-keys)
|
||||
(add-hook 'mail-send-hook 'mail-hist-put-headers-into-history))
|
||||
(add-hook 'mail-mode-hook #'mail-hist-define-keys)
|
||||
(add-hook 'mail-send-hook #'mail-hist-put-headers-into-history))
|
||||
|
||||
(defvar mail-hist-header-ring-alist nil
|
||||
"Alist of form (header-name . history-ring).
|
||||
@ -80,14 +80,12 @@ previous/next input.")
|
||||
(defcustom mail-hist-history-size (or kill-ring-max 1729)
|
||||
"The maximum number of elements in a mail field's history.
|
||||
Oldest elements are dumped first."
|
||||
:type 'integer
|
||||
:group 'mail-hist)
|
||||
:type 'integer)
|
||||
|
||||
;;;###autoload
|
||||
(defcustom mail-hist-keep-history t
|
||||
"Non-nil means keep a history for headers and text of outgoing mail."
|
||||
:type 'boolean
|
||||
:group 'mail-hist)
|
||||
:type 'boolean)
|
||||
|
||||
;; For handling repeated history requests
|
||||
(defvar mail-hist-access-count 0)
|
||||
@ -184,8 +182,7 @@ HEADER is a string without the colon."
|
||||
(defcustom mail-hist-text-size-limit nil
|
||||
"Don't store any header or body with more than this many characters.
|
||||
If the value is nil, that means no limit on text size."
|
||||
:type '(choice (const nil) integer)
|
||||
:group 'mail-hist)
|
||||
:type '(choice (const nil) integer))
|
||||
|
||||
(defun mail-hist-text-too-long-p (text)
|
||||
"Return non-nil if TEXT's length exceeds `mail-hist-text-size-limit'."
|
||||
|
@ -134,7 +134,7 @@ we expect to find and remove the wrapper characters =?ISO-8859-1?Q?....?=."
|
||||
(aref string (1+ (match-beginning 1))))))
|
||||
strings)))
|
||||
(setq i (match-end 0)))
|
||||
(apply 'concat (nreverse (cons (substring string i) strings))))))
|
||||
(apply #'concat (nreverse (cons (substring string i) strings))))))
|
||||
|
||||
;; FIXME Gnus for some reason has `quoted-printable-decode-region' in qp.el.
|
||||
;;;###autoload
|
||||
@ -194,7 +194,7 @@ Also delete leading/trailing whitespace and replace FOO <BAR> with just BAR.
|
||||
Return a modified address list."
|
||||
(when address
|
||||
(if mail-use-rfc822
|
||||
(mapconcat 'identity (rfc822-addresses address) ", ")
|
||||
(mapconcat #'identity (rfc822-addresses address) ", ")
|
||||
(let (pos)
|
||||
|
||||
;; Strip comments.
|
||||
@ -282,7 +282,7 @@ comma-separated list, and return the pruned list."
|
||||
destinations))
|
||||
|
||||
;; Legacy name
|
||||
(define-obsolete-function-alias 'rmail-dont-reply-to 'mail-dont-reply-to "24.1")
|
||||
(define-obsolete-function-alias 'rmail-dont-reply-to #'mail-dont-reply-to "24.1")
|
||||
|
||||
|
||||
;;;###autoload
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; mailabbrev.el --- abbrev-expansion of mail aliases
|
||||
;;; mailabbrev.el --- abbrev-expansion of mail aliases -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1985-1987, 1992-1993, 1996-1997, 2000-2021 Free
|
||||
;; Software Foundation, Inc.
|
||||
@ -140,15 +140,13 @@ abbrev-like expansion is performed when editing certain mail
|
||||
headers (those specified by `mail-abbrev-mode-regexp'), based on
|
||||
the entries in your `mail-personal-alias-file'."
|
||||
:global t
|
||||
:group 'mail-abbrev
|
||||
:version "20.3"
|
||||
(if mail-abbrevs-mode (mail-abbrevs-enable) (mail-abbrevs-disable)))
|
||||
|
||||
(defcustom mail-abbrevs-only nil
|
||||
"Non-nil means only mail abbrevs should expand automatically.
|
||||
Other abbrevs expand only when you explicitly use `expand-abbrev'."
|
||||
:type 'boolean
|
||||
:group 'mail-abbrev)
|
||||
:type 'boolean)
|
||||
|
||||
;; originally defined in sendmail.el - used to be an alist, now is a table.
|
||||
(defvar mail-abbrevs nil
|
||||
@ -186,11 +184,11 @@ no aliases, which is represented by this being a table with no entries.)")
|
||||
(abbrev-mode 1))
|
||||
|
||||
(defun mail-abbrevs-enable ()
|
||||
(add-hook 'mail-mode-hook 'mail-abbrevs-setup))
|
||||
(add-hook 'mail-mode-hook #'mail-abbrevs-setup))
|
||||
|
||||
(defun mail-abbrevs-disable ()
|
||||
"Turn off use of the `mailabbrev' package."
|
||||
(remove-hook 'mail-mode-hook 'mail-abbrevs-setup)
|
||||
(remove-hook 'mail-mode-hook #'mail-abbrevs-setup)
|
||||
(abbrev-mode (if (default-value 'abbrev-mode) 1 -1)))
|
||||
|
||||
;;;###autoload
|
||||
@ -258,8 +256,7 @@ By default this is the file specified by `mail-personal-alias-file'."
|
||||
"String inserted between addresses in multi-address mail aliases.
|
||||
This has to contain a comma, so \", \" is a reasonable value. You might
|
||||
also want something like \",\\n \" to get each address on its own line."
|
||||
:type 'string
|
||||
:group 'mail-abbrev)
|
||||
:type 'string)
|
||||
|
||||
;; define-mail-abbrev sets this flag, which causes mail-resolve-all-aliases
|
||||
;; to be called before expanding abbrevs if it's necessary.
|
||||
@ -367,7 +364,7 @@ double-quotes."
|
||||
(defun mail-resolve-all-aliases-1 (sym &optional so-far)
|
||||
(if (memq sym so-far)
|
||||
(error "mail alias loop detected: %s"
|
||||
(mapconcat 'symbol-name (cons sym so-far) " <- ")))
|
||||
(mapconcat #'symbol-name (cons sym so-far) " <- ")))
|
||||
(let ((definition (and (boundp sym) (symbol-value sym))))
|
||||
(if definition
|
||||
(let ((result '())
|
||||
@ -420,8 +417,7 @@ of the current line; if it matches, abbrev mode will be turned on, otherwise
|
||||
it will be turned off. (You don't need to worry about continuation lines.)
|
||||
This should be set to match those mail fields in which you want abbreviations
|
||||
turned on."
|
||||
:type 'regexp
|
||||
:group 'mail-abbrev)
|
||||
:type 'regexp)
|
||||
|
||||
(defvar mail-abbrev-syntax-table nil
|
||||
"The syntax-table used for abbrev-expansion purposes.
|
||||
@ -433,14 +429,14 @@ of a mail alias. The value is set up, buffer-local, when first needed.")
|
||||
(make-local-variable 'mail-abbrev-syntax-table)
|
||||
(unless mail-abbrev-syntax-table
|
||||
(let ((tab (copy-syntax-table (syntax-table)))
|
||||
(_ (aref (standard-syntax-table) ?_))
|
||||
(syntax-_ (aref (standard-syntax-table) ?_))
|
||||
(w (aref (standard-syntax-table) ?w)))
|
||||
(map-char-table
|
||||
(lambda (key value)
|
||||
(if (null value)
|
||||
;; Fetch the inherited value
|
||||
(setq value (aref tab key)))
|
||||
(if (equal value _)
|
||||
(if (equal value syntax-_)
|
||||
(set-char-table-range tab key w)))
|
||||
tab)
|
||||
(modify-syntax-entry ?@ "w" tab)
|
||||
@ -600,12 +596,12 @@ In other respects, this behaves like `end-of-buffer', which see."
|
||||
|
||||
(eval-after-load "sendmail"
|
||||
'(progn
|
||||
(define-key mail-mode-map "\C-c\C-a" 'mail-abbrev-insert-alias)
|
||||
(define-key mail-mode-map "\C-c\C-a" #'mail-abbrev-insert-alias)
|
||||
(define-key mail-mode-map "\e\t" ; like completion-at-point
|
||||
'mail-abbrev-complete-alias)))
|
||||
#'mail-abbrev-complete-alias))) ;; FIXME: Use `completion-at-point'.
|
||||
|
||||
;;(define-key mail-mode-map "\C-n" 'mail-abbrev-next-line)
|
||||
;;(define-key mail-mode-map "\M->" 'mail-abbrev-end-of-buffer)
|
||||
;;(define-key mail-mode-map "\C-n" #'mail-abbrev-next-line)
|
||||
;;(define-key mail-mode-map "\M->" #'mail-abbrev-end-of-buffer)
|
||||
|
||||
(provide 'mailabbrev)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; mailclient.el --- mail sending via system's mail client.
|
||||
;;; mailclient.el --- mail sending via system's mail client. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2005-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; mailheader.el --- mail header parsing, merging, formatting
|
||||
;;; mailheader.el --- mail header parsing, merging, formatting -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1996, 2001-2021 Free Software Foundation, Inc.
|
||||
|
||||
@ -99,23 +99,23 @@ value."
|
||||
headers)
|
||||
|
||||
;; Advertised part of the interface; see mail-header, mail-header-set.
|
||||
(with-suppressed-warnings ((lexical headers))
|
||||
(defvar headers))
|
||||
|
||||
(defsubst mail-header (header &optional header-alist)
|
||||
(defun mail-header (header &optional header-alist)
|
||||
"Return the value associated with header HEADER in HEADER-ALIST.
|
||||
If the value is a string, it is the original value of the header. If the
|
||||
value is a list, its first element is the original value of the header,
|
||||
with any subsequent elements being the result of parsing the value.
|
||||
If HEADER-ALIST is nil, the dynamically bound variable `headers' is used."
|
||||
with any subsequent elements being the result of parsing the value."
|
||||
(declare (gv-setter (lambda (value)
|
||||
`(mail-header-set ,header ,value ,header-alist))))
|
||||
(with-suppressed-warnings ((lexical headers)) (defvar headers))
|
||||
(cdr (assq header (or header-alist headers))))
|
||||
|
||||
(defun mail-header-set (header value &optional header-alist)
|
||||
"Set the value associated with header HEADER to VALUE in HEADER-ALIST.
|
||||
HEADER-ALIST defaults to the dynamically bound variable `headers' if nil.
|
||||
See `mail-header' for the semantics of VALUE."
|
||||
(declare (obsolete alist-get "28.1"))
|
||||
(with-suppressed-warnings ((lexical headers)) (defvar headers))
|
||||
(let* ((alist (or header-alist headers))
|
||||
(entry (assq header alist)))
|
||||
(if entry
|
||||
@ -131,10 +131,13 @@ should be a string or a list of string. The first element may be nil to
|
||||
denote that the formatting functions must use the remaining elements, or
|
||||
skip the header altogether if there are no other elements.
|
||||
The macro `mail-header' can be used to access headers in HEADERS."
|
||||
(mapcar
|
||||
(lambda (rule)
|
||||
(cons (car rule) (eval (cdr rule))))
|
||||
merge-rules))
|
||||
(declare (obsolete alist-get "28.1"))
|
||||
(with-suppressed-warnings ((lexical headers)) (defvar headers))
|
||||
(let ((headers headers))
|
||||
(mapcar
|
||||
(lambda (rule)
|
||||
(cons (car rule) (eval (cdr rule) t)))
|
||||
merge-rules)))
|
||||
|
||||
(defvar mail-header-format-function
|
||||
(lambda (header value)
|
||||
@ -167,7 +170,7 @@ A key of nil has as its value a list of defaulted headers to ignore."
|
||||
(mapcar #'car format-rules))))
|
||||
(dolist (rule format-rules)
|
||||
(let* ((header (car rule))
|
||||
(value (mail-header header)))
|
||||
(value (alist-get header headers)))
|
||||
(if (stringp header)
|
||||
(setq header (intern header)))
|
||||
(cond ((null header) 'ignore)
|
||||
@ -176,13 +179,11 @@ A key of nil has as its value a list of defaulted headers to ignore."
|
||||
(unless (memq (car defaulted) ignore)
|
||||
(let* ((header (car defaulted))
|
||||
(value (cdr defaulted)))
|
||||
(if (cdr rule)
|
||||
(funcall (cdr rule) header value)
|
||||
(funcall mail-header-format-function header value))))))
|
||||
(funcall (or (cdr rule) mail-header-format-function)
|
||||
header value)))))
|
||||
(value
|
||||
(if (cdr rule)
|
||||
(funcall (cdr rule) header value)
|
||||
(funcall mail-header-format-function header value))))))
|
||||
(funcall (or (cdr rule) mail-header-format-function)
|
||||
header value)))))
|
||||
(insert "\n")))
|
||||
|
||||
(provide 'mailheader)
|
||||
|
@ -167,11 +167,11 @@ your primary spool is. If this fails, set it to something like
|
||||
|
||||
(defvar mspools-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map "\C-c\C-c" 'mspools-visit-spool)
|
||||
(define-key map "\C-m" 'mspools-visit-spool)
|
||||
(define-key map " " 'mspools-visit-spool)
|
||||
(define-key map "n" 'next-line)
|
||||
(define-key map "p" 'previous-line)
|
||||
(define-key map "\C-c\C-c" #'mspools-visit-spool)
|
||||
(define-key map "\C-m" #'mspools-visit-spool)
|
||||
(define-key map " " #'mspools-visit-spool)
|
||||
(define-key map "n" #'next-line)
|
||||
(define-key map "p" #'previous-line)
|
||||
map)
|
||||
"Keymap for the *spools* buffer.")
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; rfc822.el --- hairy RFC 822 (or later) parser for mail, news, etc.
|
||||
;;; rfc822.el --- hairy RFC 822 (or later) parser for mail, news, etc. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1986-1987, 1990, 2001-2021 Free Software Foundation,
|
||||
;; Inc.
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; rmail-spam-filter.el --- spam filter for Rmail, the Emacs mail reader
|
||||
;;; rmail-spam-filter.el --- spam filter for Rmail, the Emacs mail reader -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
|
||||
;; Keywords: email, spam, filter, rmail
|
||||
@ -82,50 +82,42 @@
|
||||
(defcustom rmail-use-spam-filter nil
|
||||
"Non-nil to activate the Rmail spam filter.
|
||||
Set `rsf-definitions-alist' to define what you consider spam emails."
|
||||
:type 'boolean
|
||||
:group 'rmail-spam-filter)
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom rsf-file "~/XRMAIL-SPAM"
|
||||
"Name of Rmail file for optionally saving some of the spam.
|
||||
You can either just delete spam, or save it in this file for
|
||||
later review. Which action to take for each spam definition is
|
||||
specified by the \"action\" element of the definition."
|
||||
:type 'string
|
||||
:group 'rmail-spam-filter)
|
||||
:type 'string)
|
||||
|
||||
(defcustom rsf-no-blind-cc nil
|
||||
"Non-nil means mail with no explicit To: or Cc: is spam."
|
||||
:type 'boolean
|
||||
:group 'rmail-spam-filter)
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom rsf-ignore-case nil
|
||||
"Non-nil means to ignore case in `rsf-definitions-alist'."
|
||||
:type 'boolean
|
||||
:group 'rmail-spam-filter)
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom rsf-beep nil
|
||||
"Non-nil means to beep if spam is found."
|
||||
:type 'boolean
|
||||
:group 'rmail-spam-filter)
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom rsf-sleep-after-message 2.0
|
||||
"Seconds to wait after displaying a message that spam was found."
|
||||
:type 'number
|
||||
:group 'rmail-spam-filter)
|
||||
:type 'number)
|
||||
|
||||
(defcustom rsf-min-region-to-spam-list 7
|
||||
"Minimum size of region that you can add to the spam list.
|
||||
The aim is to avoid adding too short a region, which could result
|
||||
in false positive identification of a valid message as spam."
|
||||
:type 'integer
|
||||
:group 'rmail-spam-filter)
|
||||
:type 'integer)
|
||||
|
||||
(defcustom rsf-autosave-newly-added-definitions nil
|
||||
"Non-nil to auto-save new spam entries.
|
||||
Any time you add an entry via the \"Spam\" menu, immediately saves
|
||||
the custom file."
|
||||
:type 'boolean
|
||||
:group 'rmail-spam-filter)
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom rsf-white-list nil
|
||||
"List of regexps to identify valid senders.
|
||||
@ -133,8 +125,7 @@ If any element matches the \"From\" header, the message is
|
||||
flagged as a valid, non-spam message. E.g., if your domain is
|
||||
\"emacs.com\" then including \"emacs\\\\.com\" in this list would
|
||||
flag all mail (purporting to be) from your colleagues as valid."
|
||||
:type '(repeat regexp)
|
||||
:group 'rmail-spam-filter)
|
||||
:type '(repeat regexp))
|
||||
|
||||
(defcustom rsf-definitions-alist nil
|
||||
"A list of rules (definitions) matching spam messages.
|
||||
@ -178,8 +169,7 @@ A rule matches only if all the specified elements match."
|
||||
(choice :tag "Action selection"
|
||||
(const :tag "Output and delete" output-and-delete)
|
||||
(const :tag "Delete" delete-spam)
|
||||
))))
|
||||
:group 'rmail-spam-filter)
|
||||
)))))
|
||||
|
||||
;; FIXME nothing uses this, and it could just be let-bound.
|
||||
(defvar rsf-scanning-messages-now nil
|
||||
@ -224,6 +214,8 @@ the cdr is set to t. Else, the car is set to nil."
|
||||
;; empty buffer.
|
||||
(1- (or (rmail-first-unseen-message) 1))))
|
||||
|
||||
(defvar bbdb/mail_auto_create_p)
|
||||
|
||||
(defun rmail-spam-filter (msg)
|
||||
"Return nil if message number MSG is spam based on `rsf-definitions-alist'.
|
||||
If spam, optionally output message to a file `rsf-file' and delete
|
||||
@ -522,12 +514,12 @@ to the spam list (remember to save it)" region-to-spam-list))))))
|
||||
["Customize spam definitions" rsf-customize-spam-definitions]
|
||||
["Browse spam customizations" rsf-customize-group]
|
||||
))
|
||||
(define-key map "\C-cSt" 'rsf-add-subject-to-spam-list)
|
||||
(define-key map "\C-cSr" 'rsf-add-sender-to-spam-list)
|
||||
(define-key map "\C-cSn" 'rsf-add-region-to-spam-list)
|
||||
(define-key map "\C-cSa" 'rsf-custom-save-all)
|
||||
(define-key map "\C-cSd" 'rsf-customize-spam-definitions)
|
||||
(define-key map "\C-cSg" 'rsf-customize-group))
|
||||
(define-key map "\C-cSt" #'rsf-add-subject-to-spam-list)
|
||||
(define-key map "\C-cSr" #'rsf-add-sender-to-spam-list)
|
||||
(define-key map "\C-cSn" #'rsf-add-region-to-spam-list)
|
||||
(define-key map "\C-cSa" #'rsf-custom-save-all)
|
||||
(define-key map "\C-cSd" #'rsf-customize-spam-definitions)
|
||||
(define-key map "\C-cSg" #'rsf-customize-group))
|
||||
|
||||
(defun rsf-add-content-type-field ()
|
||||
"Maintain backward compatibility for `rmail-spam-filter'.
|
||||
|
@ -1721,7 +1721,7 @@ not be a new one). It returns non-nil if it got any new messages."
|
||||
(buffer-read-only nil)
|
||||
;; Don't make undo records while getting mail.
|
||||
(buffer-undo-list t)
|
||||
delete-files files file-last-names)
|
||||
files file-last-names) ;; delete-files
|
||||
;; Pull files off all-files onto files as long as there is
|
||||
;; no name conflict. A conflict happens when two inbox
|
||||
;; file names have the same last component.
|
||||
@ -1743,7 +1743,7 @@ not be a new one). It returns non-nil if it got any new messages."
|
||||
(while (not (looking-back "\n\n" (- (point) 2)))
|
||||
(insert "\n")))
|
||||
(setq found (or
|
||||
(rmail-get-new-mail-1 file-name files delete-files)
|
||||
(rmail-get-new-mail-1 file-name files nil) ;; delete-files
|
||||
found))))
|
||||
;; Move to the first new message unless we have other unseen
|
||||
;; messages before it.
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; rmailedit.el --- "RMAIL edit mode" Edit the current message
|
||||
;;; rmailedit.el --- "RMAIL edit mode" Edit the current message -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1985, 1994, 2001-2021 Free Software Foundation, Inc.
|
||||
|
||||
@ -38,8 +38,8 @@
|
||||
(let ((map (make-sparse-keymap)))
|
||||
;; Make a keymap that inherits text-mode-map.
|
||||
(set-keymap-parent map text-mode-map)
|
||||
(define-key map "\C-c\C-c" 'rmail-cease-edit)
|
||||
(define-key map "\C-c\C-]" 'rmail-abort-edit)
|
||||
(define-key map "\C-c\C-c" #'rmail-cease-edit)
|
||||
(define-key map "\C-c\C-]" #'rmail-abort-edit)
|
||||
map))
|
||||
|
||||
(declare-function rmail-summary-disable "rmailsum" ())
|
||||
@ -69,7 +69,7 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'.
|
||||
(setq-local auto-save-include-big-deletions t)
|
||||
;; If someone uses C-x C-s, don't clobber the rmail file (bug#2625).
|
||||
(add-hook 'write-region-annotate-functions
|
||||
'rmail-write-region-annotate nil t)
|
||||
#'rmail-write-region-annotate nil t)
|
||||
(run-mode-hooks 'rmail-edit-mode-hook)))
|
||||
|
||||
;; Rmail Edit mode is suitable only for specially formatted data.
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; rmailkwd.el --- part of the "RMAIL" mail reader for Emacs
|
||||
;;; rmailkwd.el --- part of the "RMAIL" mail reader for Emacs -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1985, 1988, 1994, 2001-2021 Free Software Foundation,
|
||||
;; Inc.
|
||||
@ -73,7 +73,7 @@ according to the choice made, and returns a symbol."
|
||||
(or (eq major-mode 'rmail-summary-mode)
|
||||
(rmail-summary-exists)
|
||||
(and (setq old (rmail-get-keywords))
|
||||
(mapc 'rmail-make-label (split-string old ", "))))
|
||||
(mapc #'rmail-make-label (split-string old ", "))))
|
||||
(completing-read (concat prompt
|
||||
(if rmail-last-label
|
||||
(concat " (default "
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; rmailmsc.el --- miscellaneous support functions for the RMAIL mail reader
|
||||
;;; rmailmsc.el --- miscellaneous support functions for the RMAIL mail reader -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1985, 2001-2021 Free Software Foundation, Inc.
|
||||
|
||||
@ -45,7 +45,7 @@ This applies only to the current session."
|
||||
(nreverse (mail-parse-comma-list)))))
|
||||
(when (or (not rmail-inbox-list)
|
||||
(y-or-n-p (concat "Replace "
|
||||
(mapconcat 'identity
|
||||
(mapconcat #'identity
|
||||
rmail-inbox-list
|
||||
", ")
|
||||
"? ")))
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; rmailout.el --- "RMAIL" mail reader for Emacs: output message to a file
|
||||
;;; rmailout.el --- "RMAIL" mail reader for Emacs: output message to a file -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1985, 1987, 1993-1994, 2001-2021 Free Software
|
||||
;; Foundation, Inc.
|
||||
@ -81,14 +81,14 @@ This uses `rmail-output-file-alist'."
|
||||
(widen)
|
||||
(narrow-to-region beg end)
|
||||
(let ((tail rmail-output-file-alist)
|
||||
answer err)
|
||||
answer) ;; err
|
||||
;; Suggest a file based on a pattern match.
|
||||
(while (and tail (not answer))
|
||||
(goto-char (point-min))
|
||||
(if (re-search-forward (caar tail) nil t)
|
||||
(setq answer
|
||||
(condition-case err
|
||||
(eval (cdar tail))
|
||||
(eval (cdar tail) t)
|
||||
(error
|
||||
(display-warning
|
||||
'rmail-output
|
||||
@ -197,7 +197,8 @@ display message number MSG."
|
||||
|
||||
(defun rmail-convert-to-babyl-format ()
|
||||
"Convert the mbox message in the current buffer to Babyl format."
|
||||
(let ((count 0) (start (point-min))
|
||||
(let (;; (count 0)
|
||||
(start (point-min))
|
||||
(case-fold-search nil)
|
||||
(buffer-undo-list t))
|
||||
(goto-char (point-min))
|
||||
@ -357,7 +358,7 @@ unless NOMSG is a symbol (neither nil nor t).
|
||||
AS-SEEN is non-nil if we are copying the message \"as seen\"."
|
||||
(let ((case-fold-search t)
|
||||
encrypted-file-name
|
||||
from date)
|
||||
) ;; from date
|
||||
(goto-char (point-min))
|
||||
;; Preserve the Mail-From and MIME-Version fields
|
||||
;; even if they have been pruned.
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; rmailsort.el --- Rmail: sort messages
|
||||
;;; rmailsort.el --- Rmail: sort messages -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1990, 1993-1994, 2001-2021 Free Software Foundation,
|
||||
;; Inc.
|
||||
@ -142,7 +142,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order."
|
||||
"\\(,\\|\\'\\)")
|
||||
labelvec))
|
||||
(setq labels (substring labels (match-end 0))))
|
||||
(setq labelvec (apply 'vector (nreverse labelvec))
|
||||
(setq labelvec (apply #'vector (nreverse labelvec))
|
||||
nmax (length labelvec))
|
||||
(rmail-sort-messages reverse
|
||||
;; If no labels match, returns nmax; if they
|
||||
@ -205,7 +205,7 @@ Numeric keys are sorted numerically, all others as strings."
|
||||
(inhibit-read-only t)
|
||||
(current-message nil)
|
||||
(msgnum 1)
|
||||
(msginfo nil)
|
||||
;; (msginfo nil)
|
||||
(undo (not (eq buffer-undo-list t))))
|
||||
;; There's little hope that we can easily undo after that.
|
||||
(buffer-disable-undo (current-buffer))
|
||||
|
@ -326,7 +326,7 @@ for `smtpmail-try-auth-method'.")
|
||||
;; Insert an extra newline if we need it to work around
|
||||
;; Sun's bug that swallows newlines.
|
||||
(goto-char (1+ delimline))
|
||||
(if (eval mail-mailer-swallows-blank-line)
|
||||
(if (eval mail-mailer-swallows-blank-line t)
|
||||
(newline))
|
||||
;; Find and handle any Fcc fields.
|
||||
(goto-char (point-min))
|
||||
@ -627,7 +627,7 @@ USER and PASSWORD should be non-nil."
|
||||
(= code (car response)))))
|
||||
|
||||
(defun smtpmail-response-text (response)
|
||||
(mapconcat 'identity (cdr response) "\n"))
|
||||
(mapconcat #'identity (cdr response) "\n"))
|
||||
|
||||
(defun smtpmail-query-smtp-server ()
|
||||
"Query for an SMTP server and try to contact it.
|
||||
@ -741,7 +741,7 @@ Returns an error if the server cannot be contacted."
|
||||
"Unable to contact server")))
|
||||
|
||||
;; set the send-filter
|
||||
(set-process-filter process 'smtpmail-process-filter)
|
||||
(set-process-filter process #'smtpmail-process-filter)
|
||||
|
||||
(let* ((greeting (plist-get (cdr result) :greeting))
|
||||
(code (smtpmail-response-code greeting)))
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; supercite.el --- minor mode for citing mail and news replies
|
||||
;;; supercite.el --- minor mode for citing mail and news replies -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1993, 1997, 2001-2021 Free Software Foundation, Inc.
|
||||
|
||||
@ -527,71 +527,71 @@ string."
|
||||
|
||||
(defvar sc-T-keymap
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map "a" 'sc-S-preferred-attribution-list)
|
||||
(define-key map "b" 'sc-T-mail-nuke-blank-lines)
|
||||
(define-key map "c" 'sc-T-confirm-always)
|
||||
(define-key map "d" 'sc-T-downcase)
|
||||
(define-key map "e" 'sc-T-electric-references)
|
||||
(define-key map "f" 'sc-T-auto-fill-region)
|
||||
(define-key map "h" 'sc-T-describe)
|
||||
(define-key map "l" 'sc-S-cite-region-limit)
|
||||
(define-key map "n" 'sc-S-mail-nuke-mail-headers)
|
||||
(define-key map "N" 'sc-S-mail-header-nuke-list)
|
||||
(define-key map "o" 'sc-T-electric-circular)
|
||||
(define-key map "p" 'sc-S-preferred-header-style)
|
||||
(define-key map "s" 'sc-T-nested-citation)
|
||||
(define-key map "u" 'sc-T-use-only-preferences)
|
||||
(define-key map "w" 'sc-T-fixup-whitespace)
|
||||
(define-key map "?" 'sc-T-describe)
|
||||
(define-key map "a" #'sc-S-preferred-attribution-list)
|
||||
(define-key map "b" #'sc-T-mail-nuke-blank-lines)
|
||||
(define-key map "c" #'sc-T-confirm-always)
|
||||
(define-key map "d" #'sc-T-downcase)
|
||||
(define-key map "e" #'sc-T-electric-references)
|
||||
(define-key map "f" #'sc-T-auto-fill-region)
|
||||
(define-key map "h" #'sc-T-describe)
|
||||
(define-key map "l" #'sc-S-cite-region-limit)
|
||||
(define-key map "n" #'sc-S-mail-nuke-mail-headers)
|
||||
(define-key map "N" #'sc-S-mail-header-nuke-list)
|
||||
(define-key map "o" #'sc-T-electric-circular)
|
||||
(define-key map "p" #'sc-S-preferred-header-style)
|
||||
(define-key map "s" #'sc-T-nested-citation)
|
||||
(define-key map "u" #'sc-T-use-only-preferences)
|
||||
(define-key map "w" #'sc-T-fixup-whitespace)
|
||||
(define-key map "?" #'sc-T-describe)
|
||||
map)
|
||||
"Keymap for sub-keymap of setting and toggling functions.")
|
||||
|
||||
(defvar sc-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map "c" 'sc-cite-region)
|
||||
(define-key map "f" 'sc-mail-field-query)
|
||||
(define-key map "g" 'sc-mail-process-headers)
|
||||
(define-key map "h" 'sc-describe)
|
||||
(define-key map "i" 'sc-insert-citation)
|
||||
(define-key map "o" 'sc-open-line)
|
||||
(define-key map "r" 'sc-recite-region)
|
||||
(define-key map "\C-p" 'sc-raw-mode-toggle)
|
||||
(define-key map "u" 'sc-uncite-region)
|
||||
(define-key map "w" 'sc-insert-reference)
|
||||
(define-key map "\C-t" sc-T-keymap)
|
||||
(define-key map "?" 'sc-describe)
|
||||
(define-key map "c" #'sc-cite-region)
|
||||
(define-key map "f" #'sc-mail-field-query)
|
||||
(define-key map "g" #'sc-mail-process-headers)
|
||||
(define-key map "h" #'sc-describe)
|
||||
(define-key map "i" #'sc-insert-citation)
|
||||
(define-key map "o" #'sc-open-line)
|
||||
(define-key map "r" #'sc-recite-region)
|
||||
(define-key map "\C-p" #'sc-raw-mode-toggle)
|
||||
(define-key map "u" #'sc-uncite-region)
|
||||
(define-key map "w" #'sc-insert-reference)
|
||||
(define-key map "\C-t" sc-T-keymap)
|
||||
(define-key map "?" #'sc-describe)
|
||||
map)
|
||||
"Keymap for Supercite quasi-mode.")
|
||||
|
||||
(defvar sc-electric-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map "p" 'sc-eref-prev)
|
||||
(define-key map "n" 'sc-eref-next)
|
||||
(define-key map "s" 'sc-eref-setn)
|
||||
(define-key map "j" 'sc-eref-jump)
|
||||
(define-key map "x" 'sc-eref-abort)
|
||||
(define-key map "q" 'sc-eref-abort)
|
||||
(define-key map "\r" 'sc-eref-exit)
|
||||
(define-key map "\n" 'sc-eref-exit)
|
||||
(define-key map "g" 'sc-eref-goto)
|
||||
(define-key map "?" 'describe-mode)
|
||||
(define-key map "\C-h" 'describe-mode)
|
||||
(define-key map [f1] 'describe-mode)
|
||||
(define-key map [help] 'describe-mode)
|
||||
(define-key map "p" #'sc-eref-prev)
|
||||
(define-key map "n" #'sc-eref-next)
|
||||
(define-key map "s" #'sc-eref-setn)
|
||||
(define-key map "j" #'sc-eref-jump)
|
||||
(define-key map "x" #'sc-eref-abort)
|
||||
(define-key map "q" #'sc-eref-abort)
|
||||
(define-key map "\r" #'sc-eref-exit)
|
||||
(define-key map "\n" #'sc-eref-exit)
|
||||
(define-key map "g" #'sc-eref-goto)
|
||||
(define-key map "?" #'describe-mode)
|
||||
(define-key map "\C-h" #'describe-mode)
|
||||
(define-key map [f1] #'describe-mode)
|
||||
(define-key map [help] #'describe-mode)
|
||||
map)
|
||||
"Keymap for `sc-electric-mode' electric references mode.")
|
||||
|
||||
|
||||
(defvar sc-minibuffer-local-completion-map
|
||||
(let ((map (copy-keymap minibuffer-local-completion-map)))
|
||||
(define-key map "\C-t" 'sc-toggle-fn)
|
||||
(define-key map " " 'self-insert-command)
|
||||
(define-key map "\C-t" #'sc-toggle-fn)
|
||||
(define-key map " " #'self-insert-command)
|
||||
map)
|
||||
"Keymap for minibuffer confirmation of attribution strings.")
|
||||
|
||||
(defvar sc-minibuffer-local-map
|
||||
(let ((map (copy-keymap minibuffer-local-map)))
|
||||
(define-key map "\C-t" 'sc-toggle-fn)
|
||||
(define-key map "\C-t" #'sc-toggle-fn)
|
||||
map)
|
||||
"Keymap for minibuffer confirmation of attribution strings.")
|
||||
|
||||
@ -1109,6 +1109,8 @@ Only used during confirmation."
|
||||
(setq sc-attrib-or-cite (not sc-attrib-or-cite))
|
||||
(throw 'sc-reconfirm t))
|
||||
|
||||
(defvar completer-disable) ;; From some `completer.el' package.
|
||||
|
||||
(defun sc-select-attribution ()
|
||||
"Select an attribution from `sc-attributions'.
|
||||
|
||||
@ -1150,7 +1152,7 @@ to the auto-selected attribution string."
|
||||
(setq attribution attrib
|
||||
attriblist nil))
|
||||
((listp attrib)
|
||||
(setq attribution (eval attrib))
|
||||
(setq attribution (eval attrib t))
|
||||
(if (stringp attribution)
|
||||
(setq attriblist nil)
|
||||
(setq attribution nil
|
||||
@ -1593,7 +1595,7 @@ error occurs."
|
||||
(let ((ref (nth sc-eref-style sc-rewrite-header-list)))
|
||||
(condition-case err
|
||||
(progn
|
||||
(eval ref)
|
||||
(eval ref t)
|
||||
(let ((lines (count-lines (point-min) (point-max))))
|
||||
(or nomsg (message "Ref header %d [%d line%s]: %s"
|
||||
sc-eref-style lines
|
||||
@ -1767,8 +1769,7 @@ querying you by typing `C-h'. Note that the format is changed
|
||||
slightly from that used by `set-variable' -- the current value is
|
||||
printed just after the variable's name instead of at the bottom of the
|
||||
help window."
|
||||
(let* ((minibuffer-help-form '(funcall myhelp))
|
||||
(myhelp
|
||||
(let* ((myhelp
|
||||
(lambda ()
|
||||
(with-output-to-temp-buffer "*Help*"
|
||||
(prin1 var)
|
||||
@ -1784,7 +1785,8 @@ help window."
|
||||
1))
|
||||
(with-current-buffer standard-output
|
||||
(help-mode))
|
||||
nil))))
|
||||
nil)))
|
||||
(minibuffer-help-form `(funcall #',myhelp)))
|
||||
(set var (eval-minibuffer (format "Set %s to value: " var)))))
|
||||
|
||||
(defmacro sc-toggle-symbol (rootname)
|
||||
|
@ -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))
|
||||
|
@ -1,4 +1,4 @@
|
||||
;;; unrmail.el --- convert Rmail Babyl files to mbox files
|
||||
;;; unrmail.el --- convert Rmail Babyl files to mbox files -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 1992, 2001-2021 Free Software Foundation, Inc.
|
||||
|
||||
@ -235,7 +235,7 @@ The variable `unrmail-mbox-format' controls which mbox format to use."
|
||||
;; Insert the `From ' line.
|
||||
(insert mail-from)
|
||||
;; Record the keywords and attributes in our special way.
|
||||
(insert "X-RMAIL-ATTRIBUTES: " (apply 'string attrs) "\n")
|
||||
(insert "X-RMAIL-ATTRIBUTES: " (apply #'string attrs) "\n")
|
||||
(when keywords
|
||||
(insert "X-RMAIL-KEYWORDS: " keywords "\n"))
|
||||
;; Convert From to >From, etc.
|
||||
|
Loading…
Reference in New Issue
Block a user