From: Katsumi Yamaoka Date: Mon, 30 Aug 2010 06:25:05 +0000 (+0000) Subject: Misc Gnus fixes by Lars Magne Ingebrigtsen . X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~48^2~213 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8bff7c00b717303a526a71286232040b231d14c0;p=emacs.git Misc Gnus fixes by Lars Magne Ingebrigtsen . 2010-08-29 Lars Magne Ingebrigtsen * gnus-start.el (gnus-dribble-read-file): Ensure that the directory where the dribbel file lives exists. * message.el (message-send-mail-partially-limit): Change the default to nil, since most people don't want this. * mm-url.el (mm-url-decode-entities): Also decode entities like ㈒. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 38b7da1dd24..3b6e59a32f2 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,14 @@ +2010-08-29 Lars Magne Ingebrigtsen + + * gnus-start.el (gnus-dribble-read-file): Ensure that the directory + where the dribbel file lives exists. + + * message.el (message-send-mail-partially-limit): Change the default to + nil, since most people don't want this. + + * mm-url.el (mm-url-decode-entities): Also decode entities like + ㈒. + 2009-07-16 Kevin Ryde (tiny change) * gnus-sum.el (gnus-summary-idna-message): diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 491926dc331..f3d8ce01046 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -869,6 +869,8 @@ prompt the user for the name of an NNTP server to use." (defun gnus-dribble-read-file () "Read the dribble file from disk." (let ((dribble-file (gnus-dribble-file-name))) + (unless (file-exists-p (file-name-directory dribble-file)) + (make-directory (file-name-directory dribble-file) t)) (save-excursion (set-buffer (setq gnus-dribble-buffer (gnus-get-buffer-create diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 357c8705ae4..e034dd701c6 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -1620,7 +1620,7 @@ If you'd like to make it possible to share draft files between XEmacs and Emacs, you may use `iso-2022-7bit' for this value at your own risk. Note that the coding-system `iso-2022-7bit' isn't suitable to all data.") -(defcustom message-send-mail-partially-limit 1000000 +(defcustom message-send-mail-partially-limit nil "The limitation of messages sent as message/partial. The lower bound of message size in characters, beyond which the message should be sent in several parts. If it is nil, the size is unlimited." diff --git a/lisp/gnus/mm-url.el b/lisp/gnus/mm-url.el index c963bdae00b..3e80f6ac61c 100644 --- a/lisp/gnus/mm-url.el +++ b/lisp/gnus/mm-url.el @@ -365,15 +365,20 @@ If FOLLOW-REFRESH is non-nil, redirect refresh url in META." (defun mm-url-decode-entities () "Decode all HTML entities." (goto-char (point-min)) - (while (re-search-forward "&\\(#[0-9]+\\|[a-z]+[0-9]*\\);" nil t) - (let ((elem (if (eq (aref (match-string 1) 0) ?\#) - (let ((c (mm-ucs-to-char - (string-to-number - (substring (match-string 1) 1))))) - (if (mm-char-or-char-int-p c) c ?#)) - (or (cdr (assq (intern (match-string 1)) - mm-url-html-entities)) - ?#)))) + (while (re-search-forward "&\\(#[0-9]+\\|#x[0-9a-f]+\\|[a-z]+[0-9]*\\);" nil t) + (let* ((entity (match-string 1)) + (elem (if (eq (aref entity 0) ?\#) + (let ((c (mm-ucs-to-char + ;; Hex number: ㈒ + (if (eq (aref entity 1) ?x) + (string-to-number (substring entity 2) + 16) + ;; Decimal number:  + (string-to-number (substring entity 1)))))) + (if (mm-char-or-char-int-p c) c ?#)) + (or (cdr (assq (intern entity) + mm-url-html-entities)) + ?#)))) (unless (stringp elem) (setq elem (char-to-string elem))) (replace-match elem t t))))