From c5ecc7690d4afafb42049634d64abd781ff76642 Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Mon, 24 Jan 2011 23:38:05 +0000 Subject: [PATCH] Merge changes made in Gnus trunk. shr.el: Use defface to create shr-tag-h[1-6] faces to fontify h[1-6] tags. mml-smime.el (mml-smime-use): Make it a defcustom and default to 'epg if EPG is loaded. message.texi (IDNA): Explain what it is. gnus.texi (The Empty Backend): Document nnnil (bug #7653). gnus-agent.el (gnus-agent-prompt-send-queue): Whitespace fix. shr.el (shr-expand-newlines): Proof of concept implemantation of boxy backgrounds. (shr-expand-newlines): Switch to using overlays to enable kill'n'yank in a more sensible manner. --- doc/misc/ChangeLog | 8 ++++++ doc/misc/gnus.texi | 18 +++++++++++++ doc/misc/message.texi | 4 +++ lisp/gnus/ChangeLog | 17 +++++++++++++ lisp/gnus/gnus-agent.el | 3 +-- lisp/gnus/mml-smime.el | 7 +++++- lisp/gnus/shr.el | 56 +++++++++++++++++++++++++++++++++++------ 7 files changed, 103 insertions(+), 10 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 805a048ee2f..cafa02356a9 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,11 @@ +2011-01-24 Teodor Zlatanov + + * message.texi (IDNA): Explain what it is. + +2011-01-24 Lars Ingebrigtsen + + * gnus.texi (The Empty Backend): Document nnnil (bug #7653). + 2011-01-23 Werner Lemberg * Makefile.in (MAKEINFO): Now controlled by `configure'. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 21f65e7c407..df6d212d2f5 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -704,6 +704,7 @@ Other Sources * Anything Groups:: Dired? Who needs dired? * Document Groups:: Single files can be the basis of a group. * Mail-To-News Gateways:: Posting articles via mail-to-news gateways. +* The Empty Backend:: The backend that never has any news. Document Groups @@ -17127,6 +17128,7 @@ newsgroups. * Anything Groups:: Dired? Who needs dired? * Document Groups:: Single files can be the basis of a group. * Mail-To-News Gateways:: Posting articles via mail-to-news gateways. +* The Empty Backend:: The backend that never has any news. @end menu @@ -17574,6 +17576,22 @@ So, to use this, simply say something like: @end lisp +@node The Empty Backend +@subsection The Empty Backend +@cindex nnnil + +@code{nnnil} is a backend that can be used as a placeholder if you +have to specify a backend somewhere, but don't really want to. The +classical example is if you don't want to have a primary select +methods, but want to only use secondary ones: + +@lisp +(setq gnus-select-method '(nnnil "")) +(setq gnus-secondary-select-methods + '((nnimap "foo") + (nnml ""))) +@end lisp + @node Combined Groups @section Combined Groups diff --git a/doc/misc/message.texi b/doc/misc/message.texi index 39ca57f6103..45cfe75da83 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi @@ -886,6 +886,10 @@ Manual}). @cindex internationalized domain names @cindex non-ascii domain names +@acronym{IDNA} is a standard way to encode non-@acronym{ASCII} domain +names into a readable @acronym{ASCII} string. The details can be +found in RFC 3490. + Message is a @acronym{IDNA}-compliant posting agent. The user generally doesn't have to do anything to make the @acronym{IDNA} happen---Message will encode non-@acronym{ASCII} domain names in @code{From}, diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 9780b6f4c07..10bc8f226ea 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,20 @@ +2011-01-24 Lars Ingebrigtsen + + * shr.el (shr-expand-newlines): Proof of concept implemantation of boxy + backgrounds. + (shr-expand-newlines): Switch to using overlays to enable kill'n'yank + in a more sensible manner. + +2011-01-24 Teodor Zlatanov + + * mml-smime.el (mml-smime-use): Make it a defcustom and default to 'epg + if EPG is loaded. + +2011-01-24 Julien Danjou + + * shr.el: Use defface to create shr-tag-h[1-6] faces to fontify h[1-6] + tags. + 2011-01-24 Lars Ingebrigtsen * gnus-art.el (gnus-article-read-summary-keys): Don't call disabled diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index 13fa94ee064..2c0b02d16a0 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -203,8 +203,7 @@ queue. Otherwise, queue if and only if unplugged." (const :format "When unplugged" t))) (defcustom gnus-agent-prompt-send-queue nil - "If non-nil, `gnus-group-send-queue' will prompt if called when -unplugged." + "If non-nil, `gnus-group-send-queue' will prompt if called when unplugged." :version "22.1" :group 'gnus-agent :type 'boolean) diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el index 4d27384002f..47176e96d38 100644 --- a/lisp/gnus/mml-smime.el +++ b/lisp/gnus/mml-smime.el @@ -37,7 +37,12 @@ (autoload 'message-narrow-to-headers "message") (autoload 'message-fetch-field "message") -(defvar mml-smime-use 'openssl) +(defcustom mml-smime-use (if (featurep 'epg) 'epg 'openssl) + "Whether to use OpenSSL or EPG to decrypt S/MIME messages. +Defaults to EPG if it's loaded." + :group 'mime-security + :type '(choice (const :tag "EPG" epg) + (const :tag "OpenSSL" openssl))) (defvar mml-smime-function-alist '((openssl mml-smime-openssl-sign diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index 75929b29e05..e2c51bb13e0 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el @@ -82,6 +82,30 @@ used." (const :tag "Use the width of the window" nil)) :group 'shr) +(defface shr-tag-h1 '((t (:bold t :height 2.2))) + "Face used for H1 tags." + :group 'shr) + +(defface shr-tag-h2 '((t (:bold t :height 2.0))) + "Face used for H2 tags." + :group 'shr) + +(defface shr-tag-h3 '((t (:bold t :height 1.8))) + "Face used for H3 tags." + :group 'shr) + +(defface shr-tag-h4 '((t (:bold t :height 1.6))) + "Face used for H4 tags." + :group 'shr) + +(defface shr-tag-h5 '((t (:bold t :height 1.4))) + "Face used for H5 tags." + :group 'shr) + +(defface shr-tag-h6 '((t (:bold t :height 1.2))) + "Face used for H6 tags." + :group 'shr) + (defvar shr-content-function nil "If bound, this should be a function that will return the content. This is used for cid: URLs, and the function is called with the @@ -618,7 +642,25 @@ ones, in case fg and bg are nil." (shr-put-color-1 (point) (min (line-end-position) end) type color)) (if (< (line-end-position) end) (forward-line 1) - (goto-char end))))) + (goto-char end))) + (when (eq type :background) + (shr-expand-newlines start end color)))) + +(defun shr-expand-newlines (start end color) + (save-restriction + (narrow-to-region start end) + (let ((width (shr-natural-width)) + column) + (goto-char (point-min)) + (while (not (eobp)) + (end-of-line) + (when (and (< (setq current-column (current-column)) width) + (not (overlays-at (point)))) + (let ((overlay (make-overlay (point) (1+ (point))))) + (overlay-put overlay 'before-string + (propertize (make-string (- width current-column) ? ) + 'face (list :background color))))) + (forward-line 1))))) (defun shr-put-color-1 (start end type color) (let* ((old-props (get-text-property start 'face)) @@ -832,22 +874,22 @@ ones, in case fg and bg are nil." (shr-generic cont)) (defun shr-tag-h1 (cont) - (shr-heading cont 'bold 'underline)) + (shr-heading cont 'shr-tag-h1)) (defun shr-tag-h2 (cont) - (shr-heading cont 'bold)) + (shr-heading cont 'shr-tag-h2)) (defun shr-tag-h3 (cont) - (shr-heading cont 'italic)) + (shr-heading cont 'shr-tag-h3)) (defun shr-tag-h4 (cont) - (shr-heading cont)) + (shr-heading cont 'shr-tag-h4)) (defun shr-tag-h5 (cont) - (shr-heading cont)) + (shr-heading cont 'shr-tag-h5)) (defun shr-tag-h6 (cont) - (shr-heading cont)) + (shr-heading cont 'shr-tag-h6)) (defun shr-tag-hr (cont) (shr-ensure-newline) -- 2.39.5