Commit graph

100 commits

Author SHA1 Message Date
Stefan Monnier
d9c94e93b7 * 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.
2021-03-11 14:32:42 -05:00
Lars Ingebrigtsen
c502cdd2b7 Don't add Content-Type when ceasing an rmail edit
* lisp/mail/rmailedit.el (rmail-cease-edit): Take an optional
parameter to avoid altering the message (bug#13327).
(rmail-abort-edit): Use it.
2021-01-20 05:08:56 +01:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Stefan Kangas
f254c8b5f3 Prefer setq-local in mail/*.el
* lisp/mail/emacsbug.el (report-emacs-bug):
* lisp/mail/rfc822.el (rfc822-addresses):
* lisp/mail/rmail.el (rmail-perm-variables, rmail-show-message-1):
* lisp/mail/rmailedit.el (rmail-edit-mode):
(rmail-edit-current-message, rmail-cease-edit):
* lisp/mail/rmailsum.el (rmail-new-summary-1, rmail-summary-mode):
(rmail-summary-update-highlight):
* lisp/mail/sendmail.el (mail-mode): Prefer setq-local.
2020-12-05 10:54:14 +01:00
Lars Ingebrigtsen
e6e59a349b Remove come compat code from rmailedit.el
* lisp/mail/rmailedit.el (rmail-edit-mode): Remove check for
mode-line-modified, which is always defined.
2020-08-18 11:25:05 +02:00
Paul Eggert
365e01cc9f Update copyright year to 2020
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Eli Zaretskii
a76a1d0c0b Ensure Rmail summary is updated after editing a message
* lisp/mail/rmailedit.el (rmail-cease-edit): If this mbox file
has a summary, update the summary after editing.  (Bug#38193)
2019-11-19 17:59:02 +02:00
Paul Eggert
f744797af1 Go back to "Maintainer: emacs-devel@gnu.org"
Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is
no special maintainer for a file.  Although this wasn't documented
it was common practice and removing the lines didn't have consensus.
2019-05-25 14:25:18 -07:00
Paul Eggert
bef1be8730 Fixes for "Maintainer:" and related lines
Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines,
which are not that useful.  It also cleans up and regularizes a
few similar lines.
2019-05-19 21:34:27 -07:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Glenn Morris
66a4e651f3 ; Fix doc typos related to indefinite articles 2018-02-16 15:16:15 -05:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Ken Olum
7ed7360855 Fix problems when editing raw undecoded message (Bug#28671)
* lisp/mail/rmailedit.el (rmail-cease-edit): If rmail-old-mime-state
is set, meaning that we are editing the raw message, do not
encode it again.  Delete old body after, not before, inserting
new, to avoid moving marker at beginning of next message.
2017-10-09 16:54:00 +03:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Ken Olum
f82d9323af Fix Rmail editing with reapplying encoding to message body
* lisp/mail/rmailedit.el (rmail-cease-edit):  If no
content-type in edited headers, look for one in original
headers and add it to edited headers.  (Bug #26918)
Use a marker to track start of new body, so that
content-transfer-encoding gets applied only to body.  (Bug #27353).
Ensure blank line at end of message after encoding, not
before.
2017-09-08 12:08:49 +03:00
Paul Eggert
bcf244ef9b Merge from origin/emacs-25
2e2a806 Fix copyright years by hand
5badc81 Update copyright year to 2017
2017-01-01 01:10:47 -08:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
John Wiegley
1dd4f26ab6 Merge from origin/emacs-25
ef33bc7 Spelling and grammar fixes
9c3dbab Fix copyright years by hand
0e96320 Update copyright year to 2016
2016-01-11 22:48:07 -08:00
Paul Eggert
0e963201d0 Update copyright year to 2016
Run admin/update-copyright.
2016-01-01 01:34:24 -08:00
Phillip Lord
ef69697161 rmail generate autoloads to non-versioned file.
* lisp/Makefile.in: Add rmail-loaddefs.el to autogenel.
* lisp/mail/rmail.el: Remove autoloads, add require.
* lisp/mail/rmailedit.el,lisp/mail/rmailkwd.el,
  lisp/mail/rmailmm.el,lisp/mail/rmailmsc.el,
  lisp/mail/rmailsort.el,lisp/mail/rmailsum.el,
  lisp/mail/undigest.el: Update file-local.
* test/lisp/mail/rmail-tests.el:
2015-12-17 20:42:15 +00:00
Glenn Morris
e82fd952f1 ; Comments. 2015-04-27 23:46:09 -07:00
Paul Eggert
7e09ef09a4 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Glenn Morris
34dc21db6e Replace "Maintainer: FSF" with the emacs-devel mailing address 2014-02-09 17:34:22 -08:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Paul Eggert
0877d0dc24 Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca 2013-01-02 08:13:04 -08:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Glenn Morris
54c8b5baf1 rmail-cease-edit fixes related to "^From " escaping
* mail/rmail.el (rmail-mime-decoded): New permanent local.
(rmail-show-message-1): Set rmail-mime-decoded when appropriate.
* mail/rmailedit.el (rmail-cease-edit): Respect rmail-mbox-format
and rmail-mime-decoded.

Fixes: debbugs:9841
2012-12-07 00:59:14 -08:00
Glenn Morris
fefa299077 rmailedit comment 2012-09-18 00:19:25 -07:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Glenn Morris
6ad1cdded9 Try to stop rmailedit destroying mime messages (bug#9840)
* lisp/mail/rmailedit.el: Require rmailmm when compiling.
(rmail-old-mime-state): New declaration.
(rmail-edit-current-message): If editing a mime message,
edit the "raw" message from the mbox buffer.
(rmail-cease-edit): Handle mime messages.
2011-11-15 21:06:06 -05:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Glenn Morris
0d9f702fd0 Nuke arch-tags. 2011-01-15 15:16:57 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Chong Yidong
bd78fa1d54 Add "Package:" file headers to denote built-in packages. 2010-08-29 12:17:13 -04:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Glenn Morris
0b44494a3c (rmail-cease-edit): Give an error if the end of the headers cannot be
located.  Simplify, subtracting superflous save-excursions.
(See http://lists.gnu.org/archive/html/bug-gnu-emacs/2009-10/msg00182.html)
2009-10-15 06:00:20 +00:00
Glenn Morris
25ab030201 (rmail-cease-edit): If there is a Content-Type header we don't
understand, don't insert another.  (Bug#4624)
If changing mime charset, insert the new one in the right place.
2009-10-06 02:37:22 +00:00
Glenn Morris
35426db400 Put autoloads in rmail.el rather than loaddefs.el. 2009-09-10 06:18:23 +00:00
Chong Yidong
a4f6970146 * mail/rmailedit.el (rmail-edit-mode): Use auto-save-include-big-deletions.
* mail/rmail.el (rmail-variables): Use auto-save-include-big-deletions.

* files.el (auto-save-mode): Revert 2009-07-21 and 2009-07-16 changes.
2009-07-21 23:34:33 +00:00
Richard M. Stallman
f5b574ad03 * mail/rmailedit.el (rmail-edit-current-message):
Call rmail-modify-format here.
(rmail-cease-edit): Not here.
2009-05-17 16:11:23 +00:00
Richard M. Stallman
4f31ad74fd * mail/rmailedit.el (rmail-cease-edit): Call rmail-modify-format. 2009-04-10 14:22:03 +00:00
Glenn Morris
e97389b933 Comment. 2009-03-11 03:33:30 +00:00
Glenn Morris
52b9c46105 (rmail-edit-mode): Set write-region-annotate-functions. (Bug#2625) 2009-03-11 03:22:37 +00:00
Glenn Morris
da5f63303a (rmail-cease-edit): Use rmail-ensure-blank-line. 2009-03-05 03:45:51 +00:00
Glenn Morris
24683c51e3 (rmail-edit-mode): Doc fix. 2009-03-04 04:20:13 +00:00
Eli Zaretskii
ff4abce949 (rmail-cease-edit): Notice changes in buffer's encoding during editing.
Make sure to use encoding that can safely encode the message.
Rewrite MIME charset= header if the new encoding is different from the old one.
2009-02-21 15:06:12 +00:00
Richard M. Stallman
59a6d2495a (rmail-edit-diff-headers): Delete spurious reference to OLD. 2009-02-15 02:32:03 +00:00
Richard M. Stallman
1945c7a74c Handle editing of header fields.
(rmail-old-headers): New variable.
(rmail-edit-current-message): Set it, recording current headers.
(rmail-cease-edit): Compute new headers and diff against old ones.
Update the mbox buffer with the changes that were made.
(rmail-edit-headers-alist): New function.
(rmail-edit-diff-headers, rmail-edit-update-headers): New functions.
2009-02-14 04:01:53 +00:00
Glenn Morris
a8e8f94704 Just require rmail.
(rmail-old-pruned): Add doc string.
(rmail-edit-current-message): Use rmail-msg-is-pruned.
(rmail-cease-edit): Don't mangle the leading From line.
Don't mark as edited if there were no changes.  (Bug#2256)
Correctly restore header state.
2009-02-10 03:33:48 +00:00