aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGnus developers2011-01-27 23:42:38 +0000
committerKatsumi Yamaoka2011-01-27 23:42:38 +0000
commit19cc66979d336c0b62cf770ecb5863a86cfd510e (patch)
tree148a3f6d63e4f10bb46bc2c03b2c9913e24a5b27
parentb1ab31aeec46fdd1c9f69a54b58800539b15b289 (diff)
downloademacs-19cc66979d336c0b62cf770ecb5863a86cfd510e.tar.gz
emacs-19cc66979d336c0b62cf770ecb5863a86cfd510e.zip
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.
-rw-r--r--lisp/gnus/ChangeLog15
-rw-r--r--lisp/gnus/gnus-art.el40
-rw-r--r--lisp/gnus/mml2015.el12
3 files changed, 58 insertions, 9 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 5a915bb5aed..2bb58c98fec 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,18 @@
12011-01-27 Lars Ingebrigtsen <larsi@gnus.org>
2
3 * gnus-art.el (article-update-date-lapsed): Ensure that point stays at
4 the "same place" even if point is on the line being replaced.
5 (article-update-date-lapsed): Allow updating both the combined lapsed
6 and the lapsed headers.
7 (article-update-date-lapsed): Skip past all the X-Sent/Date headers.
8 (article-make-date-line): Limit the number of segments dynamically to
9 avoid too-long lines.
10
112011-01-27 Julien Danjou <julien@danjou.info>
12
13 * mml2015.el (mml2015-epg-sign): Add and use mml2015-sign-with-sender.
14 (mml2015-epg-encrypt): Use mml2015-sign-with-sender.
15
12011-01-27 Katsumi Yamaoka <yamaoka@jpl.org> 162011-01-27 Katsumi Yamaoka <yamaoka@jpl.org>
2 17
3 * shr.el (shr-expand-newlines, shr-previous-newline-padding-width): 18 * shr.el (shr-expand-newlines, shr-previous-newline-padding-width):
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 327250e327b..2960e8f8e27 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -3570,8 +3570,20 @@ should replace the \"Date:\" one, or should be added below it."
3570 (concat "X-Sent: " (article-lapsed-string time))) 3570 (concat "X-Sent: " (article-lapsed-string time)))
3571 ;; A combined date/lapsed format. 3571 ;; A combined date/lapsed format.
3572 ((eq type 'combined-lapsed) 3572 ((eq type 'combined-lapsed)
3573 (concat (article-make-date-line date 'original) 3573 (let ((date-string (article-make-date-line date 'original))
3574 " (" (article-lapsed-string time 3) ")")) 3574 (segments 3)
3575 lapsed-string)
3576 (while (and
3577 (setq lapsed-string
3578 (concat " (" (article-lapsed-string time segments) ")"))
3579 (> (+ (length date-string)
3580 (length lapsed-string))
3581 (+ fill-column 10))
3582 (> segments 0))
3583 (setq segments (1- segments)))
3584 (if (> segments 0)
3585 (concat date-string lapsed-string)
3586 date-string)))
3575 ;; Display the date in proper English 3587 ;; Display the date in proper English
3576 ((eq type 'english) 3588 ((eq type 'english)
3577 (let ((dtime (decode-time time))) 3589 (let ((dtime (decode-time time)))
@@ -3674,19 +3686,33 @@ function and want to see what the date was before converting."
3674 "Function to be run from a timer to update the lapsed time line." 3686 "Function to be run from a timer to update the lapsed time line."
3675 (save-match-data 3687 (save-match-data
3676 (let (deactivate-mark) 3688 (let (deactivate-mark)
3677 (save-excursion 3689 (save-window-excursion
3678 (ignore-errors 3690 (ignore-errors
3679 (walk-windows 3691 (walk-windows
3680 (lambda (w) 3692 (lambda (w)
3681 (set-buffer (window-buffer w)) 3693 (set-buffer (window-buffer w))
3682 (when (eq major-mode 'gnus-article-mode) 3694 (when (eq major-mode 'gnus-article-mode)
3683 (let ((mark (point-marker))) 3695 (let ((mark (point-marker))
3696 (old-point (point)))
3684 (goto-char (point-min)) 3697 (goto-char (point-min))
3685 (when (re-search-forward "^X-Sent:\\|^Date:" nil t) 3698 (when (re-search-forward "^X-Sent:\\|^Date:" nil t)
3686 (if gnus-treat-date-combined-lapsed 3699 ;; If the point is on the Date line, then use that
3687 (article-date-combined-lapsed t) 3700 ;; absolute position. Otherwise, use the mark.
3701 ;; This will ensure that point stays at the "same
3702 ;; place".
3703 (when (or (< old-point (match-beginning 0))
3704 (> old-point (progn
3705 (forward-line 1)
3706 (while (and (not (eobp))
3707 (looking-at "X-Sent:\\|Date:"))
3708 (forward-line))
3709 (point))))
3710 (setq old-point nil))
3711 (when gnus-treat-date-combined-lapsed
3712 (article-date-combined-lapsed t))
3713 (when gnus-treat-date-lapsed
3688 (article-date-lapsed t))) 3714 (article-date-lapsed t)))
3689 (goto-char (marker-position mark)) 3715 (goto-char (or old-point (marker-position mark)))
3690 (move-marker mark nil)))) 3716 (move-marker mark nil))))
3691 nil 'visible)))))) 3717 nil 'visible))))))
3692 3718
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el
index 0ac6208d9d9..eb01c924c2d 100644
--- a/lisp/gnus/mml2015.el
+++ b/lisp/gnus/mml2015.el
@@ -120,6 +120,12 @@ Whether the passphrase is cached at all is controlled by
120 :group 'mime-security 120 :group 'mime-security
121 :type '(repeat (string :tag "Key ID"))) 121 :type '(repeat (string :tag "Key ID")))
122 122
123(defcustom mml2015-sign-with-sender nil
124 "If t, use message sender so find a key to sign with."
125 :group 'mime-security
126 :type 'boolean
127 :version "24.1")
128
123(defcustom mml2015-encrypt-to-self nil 129(defcustom mml2015-encrypt-to-self nil
124 "If t, add your own key ID to recipient list when encryption." 130 "If t, add your own key ID to recipient list when encryption."
125 :group 'mime-security 131 :group 'mime-security
@@ -959,7 +965,8 @@ Whether the passphrase is cached at all is controlled by
959 (let* ((inhibit-redisplay t) 965 (let* ((inhibit-redisplay t)
960 (context (epg-make-context)) 966 (context (epg-make-context))
961 (boundary (mml-compute-boundary cont)) 967 (boundary (mml-compute-boundary cont))
962 (sender (message-options-get 'message-sender)) 968 (sender (when mml2015-sign-with-sender
969 message-options-get 'message-sender))
963 signer-key 970 signer-key
964 (signers 971 (signers
965 (or (message-options-get 'mml2015-epg-signers) 972 (or (message-options-get 'mml2015-epg-signers)
@@ -1034,7 +1041,8 @@ If no one is selected, default secret key is used. "
1034 (let ((inhibit-redisplay t) 1041 (let ((inhibit-redisplay t)
1035 (context (epg-make-context)) 1042 (context (epg-make-context))
1036 (config (epg-configuration)) 1043 (config (epg-configuration))
1037 (sender (message-options-get 'message-sender)) 1044 (sender (when mml2015-sign-with-sender
1045 (message-options-get 'message-sender)))
1038 (recipients (message-options-get 'mml2015-epg-recipients)) 1046 (recipients (message-options-get 'mml2015-epg-recipients))
1039 cipher signers 1047 cipher signers
1040 (boundary (mml-compute-boundary cont)) 1048 (boundary (mml-compute-boundary cont))