Commit 19cc6697 authored by Gnus developers's avatar Gnus developers Committed by Katsumi Yamaoka

Merge changes made in Gnus trunk.

mml2015.el (mml2015-epg-sign): Add and use mml2015-sign-with-sender.
 (mml2015-epg-encrypt): Use mml2015-sign-with-sender.
gnus-art.el (article-update-date-lapsed): Ensure that point stays at the "same place" even if point is on the line being replaced.
 (article-update-date-lapsed): Allow updating both the combined lapsed and the lapsed headers.
 (article-update-date-lapsed): Skip past all the X-Sent/Date headers.
 (article-make-date-line): Limit the number of segments dynamically to avoid too-long lines.
parent b1ab31ae
2011-01-27 Lars Ingebrigtsen <larsi@gnus.org>
* gnus-art.el (article-update-date-lapsed): Ensure that point stays at
the "same place" even if point is on the line being replaced.
(article-update-date-lapsed): Allow updating both the combined lapsed
and the lapsed headers.
(article-update-date-lapsed): Skip past all the X-Sent/Date headers.
(article-make-date-line): Limit the number of segments dynamically to
avoid too-long lines.
2011-01-27 Julien Danjou <julien@danjou.info>
* mml2015.el (mml2015-epg-sign): Add and use mml2015-sign-with-sender.
(mml2015-epg-encrypt): Use mml2015-sign-with-sender.
2011-01-27 Katsumi Yamaoka <yamaoka@jpl.org>
* shr.el (shr-expand-newlines, shr-previous-newline-padding-width):
......
......@@ -3570,8 +3570,20 @@ should replace the \"Date:\" one, or should be added below it."
(concat "X-Sent: " (article-lapsed-string time)))
;; A combined date/lapsed format.
((eq type 'combined-lapsed)
(concat (article-make-date-line date 'original)
" (" (article-lapsed-string time 3) ")"))
(let ((date-string (article-make-date-line date 'original))
(segments 3)
lapsed-string)
(while (and
(setq lapsed-string
(concat " (" (article-lapsed-string time segments) ")"))
(> (+ (length date-string)
(length lapsed-string))
(+ fill-column 10))
(> segments 0))
(setq segments (1- segments)))
(if (> segments 0)
(concat date-string lapsed-string)
date-string)))
;; Display the date in proper English
((eq type 'english)
(let ((dtime (decode-time time)))
......@@ -3674,19 +3686,33 @@ function and want to see what the date was before converting."
"Function to be run from a timer to update the lapsed time line."
(save-match-data
(let (deactivate-mark)
(save-excursion
(save-window-excursion
(ignore-errors
(walk-windows
(lambda (w)
(set-buffer (window-buffer w))
(when (eq major-mode 'gnus-article-mode)
(let ((mark (point-marker)))
(let ((mark (point-marker))
(old-point (point)))
(goto-char (point-min))
(when (re-search-forward "^X-Sent:\\|^Date:" nil t)
(if gnus-treat-date-combined-lapsed
(article-date-combined-lapsed t)
;; If the point is on the Date line, then use that
;; absolute position. Otherwise, use the mark.
;; This will ensure that point stays at the "same
;; place".
(when (or (< old-point (match-beginning 0))
(> old-point (progn
(forward-line 1)
(while (and (not (eobp))
(looking-at "X-Sent:\\|Date:"))
(forward-line))
(point))))
(setq old-point nil))
(when gnus-treat-date-combined-lapsed
(article-date-combined-lapsed t))
(when gnus-treat-date-lapsed
(article-date-lapsed t)))
(goto-char (marker-position mark))
(goto-char (or old-point (marker-position mark)))
(move-marker mark nil))))
nil 'visible))))))
......
......@@ -120,6 +120,12 @@ Whether the passphrase is cached at all is controlled by
:group 'mime-security
:type '(repeat (string :tag "Key ID")))
(defcustom mml2015-sign-with-sender nil
"If t, use message sender so find a key to sign with."
:group 'mime-security
:type 'boolean
:version "24.1")
(defcustom mml2015-encrypt-to-self nil
"If t, add your own key ID to recipient list when encryption."
:group 'mime-security
......@@ -959,7 +965,8 @@ Whether the passphrase is cached at all is controlled by
(let* ((inhibit-redisplay t)
(context (epg-make-context))
(boundary (mml-compute-boundary cont))
(sender (message-options-get 'message-sender))
(sender (when mml2015-sign-with-sender
message-options-get 'message-sender))
signer-key
(signers
(or (message-options-get 'mml2015-epg-signers)
......@@ -1034,7 +1041,8 @@ If no one is selected, default secret key is used. "
(let ((inhibit-redisplay t)
(context (epg-make-context))
(config (epg-configuration))
(sender (message-options-get 'message-sender))
(sender (when mml2015-sign-with-sender
(message-options-get 'message-sender)))
(recipients (message-options-get 'mml2015-epg-recipients))
cipher signers
(boundary (mml-compute-boundary cont))
......
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