Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 102031. ------------------------------------------------------------ revno: 102031 committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2010-10-21 05:36:36 +0000 message: shr.el (shr-tag-table): Simplify. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-21 03:48:01 +0000 +++ lisp/gnus/ChangeLog 2010-10-21 05:36:36 +0000 @@ -1,3 +1,7 @@ +2010-10-21 Katsumi Yamaoka + + * shr.el (shr-tag-table): Simplify. + 2010-10-21 Lars Magne Ingebrigtsen * gnus-html.el (gnus-html-prefetch-images): Only prefetch http images === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2010-10-21 01:49:12 +0000 +++ lisp/gnus/shr.el 2010-10-21 05:36:36 +0000 @@ -642,92 +642,43 @@ (nbody (if body (shr-max-columns body))) (nfooter (if footer (shr-max-columns footer)))) (shr-tag-table-1 - (if caption - (if header - (if footer - ;; caption + hader + body + footer - (if (= nheader nbody) - (if (= nbody nfooter) - `((tr (td ,@caption)) - (tr (td (table (tbody ,@header ,@body ,@footer))))) - (if (= nfooter 1) - `((tr (td ,@caption)) - (tr (td (table (tbody ,@header ,@body)))) - ,@footer) - `((tr (td ,@caption)) - (tr (td (table (tbody ,@header ,@body)))) - (tr (td (table (tbody ,@footer))))))) - (if (= nbody nfooter) - `((tr (td ,@caption)) - (tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body ,@footer))))) - (if (= nfooter 1) - `((tr (td ,@caption)) - (tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body)))) - ,@footer) - `((tr (td ,@caption)) - (tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body)))) - (tr (td (table (tbody ,@footer)))))))) - ;; caption + header + body - (if (= nheader nbody) - `((tr (td ,@caption)) - (tr (td (table (tbody ,@header ,@body))))) - (if (= nheader 1) - `((tr (td ,@caption)) - ,@header (tr (td (table (tbody ,@body))))) - `((tr (td ,@caption)) - (tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body)))))))) - (if footer - ;; caption + body + footer - (if (= nbody nfooter) - `((tr (td (table (tbody ,@body ,@footer))))) - (if (= nfooter 1) - `((tr (td (table (tbody ,@body)))) ,@footer) - `((tr (td (table (tbody ,@body)))) - (tr (td (table (tbody ,@footer))))))) - ;; caption + body - `((tr (td ,@caption)) - (tr (td (table (tbody ,@body))))))) - (if header - (if footer - ;; header + body + footer - (if (= nheader nbody) - (if (= nbody nfooter) - `((tr (td (table (tbody ,@header ,@body ,@footer))))) - (if (= nfooter 1) - `((tr (td (table (tbody ,@header ,@body)))) - ,@footer) - `((tr (td (table (tbody ,@header ,@body)))) - (tr (td (table (tbody ,@footer))))))) - (if (= nbody nfooter) - `((tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body ,@footer))))) - (if (= nfooter 1) - `((tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body)))) - ,@footer) - `((tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body)))) - (tr (td (table (tbody ,@footer)))))))) - ;; header + body - (if (= nheader nbody) - `((tr (td (table (tbody ,@header ,@body))))) - (if (= nheader 1) - `(,@header (tr (td (table (tbody ,@body))))) - `((tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body)))))))) - (if footer - ;; body + footer - (if (= nbody nfooter) - `((tr (td (table (tbody ,@body ,@footer))))) - (if (= nfooter 1) - `((tr (td (table (tbody ,@body)))) ,@footer) - `((tr (td (table (tbody ,@body)))) - (tr (td (table (tbody ,@footer))))))) - body)))))) + (nconc + (if caption `((tr (td ,@caption)))) + (if header + (if footer + ;; hader + body + footer + (if (= nheader nbody) + (if (= nbody nfooter) + `((tr (td (table (tbody ,@header ,@body ,@footer))))) + (nconc `((tr (td (table (tbody ,@header ,@body))))) + (if (= nfooter 1) + footer + `((tr (td (table (tbody ,@footer)))))))) + (nconc `((tr (td (table (tbody ,@header))))) + (if (= nbody nfooter) + `((tr (td (table (tbody ,@body ,@footer))))) + (nconc `((tr (td (table (tbody ,@body))))) + (if (= nfooter 1) + footer + `((tr (td (table (tbody ,@footer)))))))))) + ;; header + body + (if (= nheader nbody) + `((tr (td (table (tbody ,@header ,@body))))) + (if (= nheader 1) + `(,@header (tr (td (table (tbody ,@body))))) + `((tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body)))))))) + (if footer + ;; body + footer + (if (= nbody nfooter) + `((tr (td (table (tbody ,@body ,@footer))))) + (nconc `((tr (td (table (tbody ,@body))))) + (if (= nfooter 1) + footer + `((tr (td (table (tbody ,@footer)))))))) + (if caption + `((tr (td (table (tbody ,@body))))) + body))))))) (defun shr-find-elements (cont type) (let (result) ------------------------------------------------------------ revno: 102030 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2010-10-21 03:48:01 +0000 message: gnus-html.el (gnus-html-prefetch-images): Only prefetch http images to avoid trying to snarf invalid stuff. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-21 02:52:45 +0000 +++ lisp/gnus/ChangeLog 2010-10-21 03:48:01 +0000 @@ -1,9 +1,10 @@ -2010-10-21 Katsumi Yamaoka - - * gnus-sum.el (gnus-summary-edit-article-done): Bind replace-result. - 2010-10-21 Lars Magne Ingebrigtsen + * gnus-html.el (gnus-html-prefetch-images): Only prefetch http images + to avoid trying to snarf invalid stuff. + + * gnus-sum.el (gnus-summary-edit-article-done): Bind free variable. + * gnus.el (gnus-message-archive-group): Quote value. (gnus-message-archive-group): Mark as changed. === modified file 'lisp/gnus/gnus-html.el' --- lisp/gnus/gnus-html.el 2010-10-20 22:29:38 +0000 +++ lisp/gnus/gnus-html.el 2010-10-21 03:48:01 +0000 @@ -493,7 +493,7 @@ (let ((blocked-images (with-current-buffer summary (gnus-blocked-images)))) (save-match-data - (while (re-search-forward "]+src=[\"']\\([^\"']+\\)" nil t) + (while (re-search-forward "]+src=[\"']\\(http[^\"']+\\)" nil t) (let ((url (gnus-html-encode-url (match-string 1)))) (unless (gnus-html-image-url-blocked-p url blocked-images) (when (gnus-html-cache-expired url gnus-html-image-cache-ttl) ------------------------------------------------------------ revno: 102029 committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2010-10-21 02:52:45 +0000 message: gnus-sum.el (gnus-summary-edit-article-done): Bind replace-result. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-21 02:44:47 +0000 +++ lisp/gnus/ChangeLog 2010-10-21 02:52:45 +0000 @@ -1,3 +1,7 @@ +2010-10-21 Katsumi Yamaoka + + * gnus-sum.el (gnus-summary-edit-article-done): Bind replace-result. + 2010-10-21 Lars Magne Ingebrigtsen * gnus.el (gnus-message-archive-group): Quote value. === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-10-21 01:23:34 +0000 +++ lisp/gnus/gnus-sum.el 2010-10-21 02:52:45 +0000 @@ -10278,7 +10278,8 @@ (insert (number-to-string lines)))))) ;; Replace the article. (let ((buf (current-buffer)) - (article (cdr gnus-article-current))) + (article (cdr gnus-article-current)) + replace-result) (with-temp-buffer (insert-buffer-substring buf) (if (and (not read-only) ------------------------------------------------------------ revno: 102028 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2010-10-21 02:44:47 +0000 message: gnus.el (gnus-message-archive-group): Quote value. gnus.el (gnus-message-archive-group): Mark as changed. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-21 01:49:12 +0000 +++ lisp/gnus/ChangeLog 2010-10-21 02:44:47 +0000 @@ -1,12 +1,15 @@ 2010-10-21 Lars Magne Ingebrigtsen + * gnus.el (gnus-message-archive-group): Quote value. + (gnus-message-archive-group): Mark as changed. + * shr.el (shr-add-font): Don't put the font properties on the newline or the indentation. * message.el (message-fix-before-sending): Change options when sending non-printable characters. - * gnus.el (gnus-update-message-archive-method): Change the default to + * gnus.el (gnus-message-archive-method): Change the default to monthly outgoing groups. * gnus-sum.el (gnus-summary-edit-article-done): Try to replace articles === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2010-10-21 01:28:34 +0000 +++ lisp/gnus/gnus.el 2010-10-21 02:44:47 +0000 @@ -1356,12 +1356,12 @@ value of `gnus-message-archive-method' afterward. If you want the saved \"archive\" method to be updated whenever you change the value of `gnus-message-archive-method', set this variable to a non-nil value." - :version "24.1" + :version "23.1" :group 'gnus-server :group 'gnus-message :type 'boolean) -(defcustom gnus-message-archive-group ((format-time-string "sent.%Y-%m")) +(defcustom gnus-message-archive-group '((format-time-string "sent.%Y-%m")) "*Name of the group in which to save the messages you've written. This can either be a string; a list of strings; or an alist of regexps/functions/forms to be evaluated to return a string (or a list @@ -1381,6 +1381,7 @@ However, you may wish to store the message on some other server. In that case, just return a fully prefixed name of the group -- \"nnml+private:mail.misc\", for instance." + :version "24.1" :group 'gnus-message :type '(choice (const :tag "none" nil) (const :tag "Weekly" ((format-time-string "sent.%Yw%U"))) ------------------------------------------------------------ revno: 102027 committer: Daiki Ueno branch nick: trunk timestamp: Thu 2010-10-21 11:38:46 +0900 message: Tweak revert-buffer-function to inhibit auto-mode-alist. * hexl.el (hexl-mode, hexl-mode-exit): Tweak revert-buffer-function to inhibit auto-mode-alist (Bug#7252). (hexl-revert-buffer-function): New function. (hexl-before-revert-hook, hexl-after-revert-hook): Abolish. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-19 20:45:42 +0000 +++ lisp/ChangeLog 2010-10-21 02:38:46 +0000 @@ -1,3 +1,10 @@ +2010-10-21 Daiki Ueno + + * hexl.el (hexl-mode, hexl-mode-exit): Tweak + revert-buffer-function to inhibit auto-mode-alist (Bug#7252). + (hexl-revert-buffer-function): New function. + (hexl-before-revert-hook, hexl-after-revert-hook): Abolish. + 2010-10-19 Alan Mackenzie * progmodes/cc-langs.el (c-type-decl-prefix-key): C++ bit: move === modified file 'lisp/hexl.el' --- lisp/hexl.el 2010-10-10 23:12:30 +0000 +++ lisp/hexl.el 2010-10-21 02:38:46 +0000 @@ -212,6 +212,7 @@ (defvar hexl-mode-old-syntax-table) (defvar hexl-mode-old-font-lock-keywords) (defvar hexl-mode-old-eldoc-documentation-function) +(defvar hexl-mode-old-revert-buffer-function) (defvar hexl-ascii-overlay nil "Overlay used to highlight ASCII element corresponding to current point.") @@ -373,10 +374,9 @@ (setq hexl-mode-old-font-lock-keywords font-lock-defaults) (setq font-lock-defaults '(hexl-font-lock-keywords t)) - ;; Add hooks to rehexlify or dehexlify on various events. - (add-hook 'before-revert-hook 'hexl-before-revert-hook nil t) - (add-hook 'after-revert-hook 'hexl-after-revert-hook nil t) - + (make-local-variable 'hexl-mode-old-revert-buffer-function) + (setq hexl-mode-old-revert-buffer-function revert-buffer-function) + (setq revert-buffer-function 'hexl-revert-buffer-function) (add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer nil t) ;; Set a callback function for eldoc. @@ -413,12 +413,6 @@ (let ((isearch-search-fun-function nil)) (isearch-search-fun)))) -(defun hexl-before-revert-hook () - (remove-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer t)) - -(defun hexl-after-revert-hook () - (hexl-mode)) - (defvar hexl-in-save-buffer nil) (defun hexl-save-buffer () @@ -464,6 +458,23 @@ (if (not (eq major-mode 'hexl-mode)) (hexl-mode))) +(defun hexl-revert-buffer-function (ignore-auto noconfirm) + (let ((coding-system-for-read 'no-conversion) + revert-buffer-function) + ;; Call the original `revert-buffer' without code conversion; also + ;; prevent it from changing the major mode to normal-mode, which + ;; calls `set-auto-mode'. + (revert-buffer nil nil t) + ;; A couple of hacks are necessary here: + ;; 1. change the major-mode to one other than hexl-mode since the + ;; function `hexl-mode' does nothing if the current major-mode is + ;; already hexl-mode. + ;; 2. reset change-major-mode-hook in case that `hexl-mode' + ;; previously added hexl-maybe-dehexlify-buffer to it. + (remove-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer t) + (setq major-mode 'fundamental-mode) + (hexl-mode))) + (defun hexl-mode-exit (&optional arg) "Exit Hexl mode, returning to previous mode. With arg, don't unhexlify buffer." @@ -483,8 +494,6 @@ (or (bobp) (setq original-point (1+ original-point)))) (goto-char original-point))) - (remove-hook 'before-revert-hook 'hexl-before-revert-hook t) - (remove-hook 'after-revert-hook 'hexl-after-revert-hook t) (remove-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer t) (remove-hook 'post-command-hook 'hexl-follow-ascii-find t) (setq hexl-ascii-overlay nil) @@ -512,6 +521,7 @@ (set-syntax-table hexl-mode-old-syntax-table) (setq font-lock-defaults hexl-mode-old-font-lock-keywords) (setq major-mode hexl-mode-old-major-mode) + (setq revert-buffer-function hexl-mode-old-revert-buffer-function) (force-mode-line-update)) (defun hexl-maybe-dehexlify-buffer () ------------------------------------------------------------ revno: 102026 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2010-10-21 02:31:33 +0000 message: gnus-news.texi: Mention new archive defaults. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2010-10-21 00:33:40 +0000 +++ doc/misc/ChangeLog 2010-10-21 02:31:33 +0000 @@ -1,3 +1,7 @@ +2010-10-21 Lars Magne Ingebrigtsen + + * gnus-news.texi: Mention new archive defaults. + 2010-10-21 Katsumi Yamaoka * gnus.texi (RSS): Remove nnrss-wash-html-in-text-plain-parts. === modified file 'doc/misc/gnus-news.texi' --- doc/misc/gnus-news.texi 2010-10-20 22:29:38 +0000 +++ doc/misc/gnus-news.texi 2010-10-21 02:31:33 +0000 @@ -224,6 +224,9 @@ @item Changes in Message mode @itemize @bullet +@item Gnus now defaults to saving all outgoing messages in per-month +nnfolder archives. + @item Gnus now supports the ``hashcash'' client puzzle anti-spam mechanism. Use @code{(setq message-generate-hashcash t)} to enable. @xref{Hashcash}. ------------------------------------------------------------ revno: 102025 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2010-10-21 01:49:12 +0000 message: message.el (message-fix-before-sending): Change options when sending non-printable characters. shr.el (shr-add-font): Don't put the font properties on the newline or the indentation. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-21 01:28:34 +0000 +++ lisp/gnus/ChangeLog 2010-10-21 01:49:12 +0000 @@ -1,5 +1,11 @@ 2010-10-21 Lars Magne Ingebrigtsen + * shr.el (shr-add-font): Don't put the font properties on the newline + or the indentation. + + * message.el (message-fix-before-sending): Change options when sending + non-printable characters. + * gnus.el (gnus-update-message-archive-method): Change the default to monthly outgoing groups. === modified file 'lisp/gnus/message.el' --- lisp/gnus/message.el 2010-10-18 23:41:03 +0000 +++ lisp/gnus/message.el 2010-10-21 01:49:12 +0000 @@ -4206,7 +4206,7 @@ (?r ,(format "Replace non-printable characters with \"%s\" and send" message-replacement-char)) - (?i "Ignore non-printable characters and send") + (?s "Send as is without removing anything") (?e "Continue editing")))) (if (eq choice ?e) (error "Non-printable characters")) === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2010-10-20 22:29:38 +0000 +++ lisp/gnus/shr.el 2010-10-21 01:49:12 +0000 @@ -318,9 +318,20 @@ (dolist (type types) (shr-add-font (or shr-start (point)) (point) type)))) +;; Add an overlay in the region, but avoid putting the font properties +;; on blank text at the start of the line, and the newline at the end, +;; to avoid ugliness. (defun shr-add-font (start end type) - (let ((overlay (make-overlay start end))) - (overlay-put overlay 'face type))) + (save-excursion + (goto-char start) + (while (< (point) end) + (when (bolp) + (skip-chars-forward " ")) + (let ((overlay (make-overlay (point) (min (line-end-position) end)))) + (overlay-put overlay 'face type)) + (if (< (line-end-position) end) + (forward-line 1) + (goto-char end))))) (defun shr-browse-url () "Browse the URL under point." ------------------------------------------------------------ revno: 102024 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2010-10-21 01:28:34 +0000 message: gnus.el (gnus-update-message-archive-method): Change the default to monthly outgoing groups. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-21 01:23:34 +0000 +++ lisp/gnus/ChangeLog 2010-10-21 01:28:34 +0000 @@ -1,5 +1,8 @@ 2010-10-21 Lars Magne Ingebrigtsen + * gnus.el (gnus-update-message-archive-method): Change the default to + monthly outgoing groups. + * gnus-sum.el (gnus-summary-edit-article-done): Try to replace articles that have gotten new numbers. === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2010-10-18 22:09:28 +0000 +++ lisp/gnus/gnus.el 2010-10-21 01:28:34 +0000 @@ -1356,12 +1356,12 @@ value of `gnus-message-archive-method' afterward. If you want the saved \"archive\" method to be updated whenever you change the value of `gnus-message-archive-method', set this variable to a non-nil value." - :version "23.1" ;; No Gnus + :version "24.1" :group 'gnus-server :group 'gnus-message :type 'boolean) -(defcustom gnus-message-archive-group nil +(defcustom gnus-message-archive-group ((format-time-string "sent.%Y-%m")) "*Name of the group in which to save the messages you've written. This can either be a string; a list of strings; or an alist of regexps/functions/forms to be evaluated to return a string (or a list @@ -1383,6 +1383,9 @@ \"nnml+private:mail.misc\", for instance." :group 'gnus-message :type '(choice (const :tag "none" nil) + (const :tag "Weekly" ((format-time-string "sent.%Yw%U"))) + (const :tag "Monthly" ((format-time-string "sent.%Y-%m"))) + (const :tag "Yearly" ((format-time-string "sent.%Y"))) function sexp string)) ------------------------------------------------------------ revno: 102023 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2010-10-21 01:23:34 +0000 message: Allow nnimap article editing (sort of). gnus-sum.el (gnus-summary-edit-article-done): Try to replace articles that have gotten new numbers. nnimap.el (nnimap-request-replace-article): New function. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-21 00:27:32 +0000 +++ lisp/gnus/ChangeLog 2010-10-21 01:23:34 +0000 @@ -1,3 +1,10 @@ +2010-10-21 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-edit-article-done): Try to replace articles + that have gotten new numbers. + + * nnimap.el (nnimap-request-replace-article): New function. + 2010-10-21 Katsumi Yamaoka * nnrss.el (nnrss-wash-html-in-text-plain-parts): Remove. === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-10-17 00:04:06 +0000 +++ lisp/gnus/gnus-sum.el 2010-10-21 01:23:34 +0000 @@ -10257,7 +10257,7 @@ "Make edits to the current article permanent." (interactive) (save-excursion - ;; The buffer restriction contains the entire article if it exists. + ;; The buffer restriction contains the entire article if it exists. (when (article-goto-body) (let ((lines (count-lines (point) (point-max))) (length (- (point-max) (point))) @@ -10277,15 +10277,24 @@ (delete-region (match-beginning 1) (match-end 1)) (insert (number-to-string lines)))))) ;; Replace the article. - (let ((buf (current-buffer))) + (let ((buf (current-buffer)) + (article (cdr gnus-article-current))) (with-temp-buffer (insert-buffer-substring buf) - (if (and (not read-only) - (not (gnus-request-replace-article - (cdr gnus-article-current) (car gnus-article-current) - (current-buffer) t))) + (not (setq replace-result + (gnus-request-replace-article + article (car gnus-article-current) + (current-buffer) t)))) (error "Couldn't replace article") + ;; If we got a number back, then that's the new article number + ;; for this article. Otherwise, the article number didn't change. + (when (numberp replace-result) + (with-current-buffer gnus-summary-buffer + (setq gnus-newsgroup-limit (delq article gnus-newsgroup-limit)) + (gnus-summary-limit gnus-newsgroup-limit) + (setq article replace-result) + (gnus-summary-goto-subject article t))) ;; Update the summary buffer. (if (and references (equal (message-tokenize-header references " ") @@ -10299,38 +10308,29 @@ (point-min) (point-max))) header) (with-temp-buffer - (insert (format "211 %d Article retrieved.\n" - (cdr gnus-article-current))) + (insert (format "211 %d Article retrieved.\n" article)) (insert head) (insert ".\n") (let ((nntp-server-buffer (current-buffer))) - (setq header (car (gnus-get-newsgroup-headers - nil t)))) + (setq header (car (gnus-get-newsgroup-headers nil t)))) (with-current-buffer gnus-summary-buffer - (gnus-data-set-header - (gnus-data-find (cdr gnus-article-current)) - header) - (gnus-summary-update-article-line - (cdr gnus-article-current) header) - (if (gnus-summary-goto-subject - (cdr gnus-article-current) nil t) - (gnus-summary-update-secondary-mark - (cdr gnus-article-current)))))))) + (gnus-data-set-header (gnus-data-find article) header) + (gnus-summary-update-article-line article header) + (if (gnus-summary-goto-subject article nil t) + (gnus-summary-update-secondary-mark article))))))) ;; Update threads. (set-buffer (or buffer gnus-summary-buffer)) - (gnus-summary-update-article (cdr gnus-article-current)) - (if (gnus-summary-goto-subject (cdr gnus-article-current) nil t) - (gnus-summary-update-secondary-mark - (cdr gnus-article-current)))) + (gnus-summary-update-article article) + (if (gnus-summary-goto-subject article nil t) + (gnus-summary-update-secondary-mark article))) ;; Prettify the article buffer again. (unless no-highlight (with-current-buffer gnus-article-buffer - ;;;!!! Fix this -- article should be rehighlighted. - ;;;(gnus-run-hooks 'gnus-article-display-hook) + ;;!!! Fix this -- article should be rehighlighted. + ;;(gnus-run-hooks 'gnus-article-display-hook) (set-buffer gnus-original-article-buffer) (gnus-request-article - (cdr gnus-article-current) - (car gnus-article-current) (current-buffer)))) + article (car gnus-article-current) (current-buffer)))) ;; Prettify the summary buffer line. (when (gnus-visual-p 'summary-highlight 'highlight) (gnus-run-hooks 'gnus-visual-mark-article-hook)))))) === modified file 'lisp/gnus/mm-decode.el' --- lisp/gnus/mm-decode.el 2010-10-20 22:29:38 +0000 +++ lisp/gnus/mm-decode.el 2010-10-21 01:23:34 +0000 @@ -1690,7 +1690,7 @@ (shr-blocked-images (if (and (boundp 'gnus-summary-buffer) (buffer-name gnus-summary-buffer)) (with-current-buffer gnus-summary-buffer - gnus-blocked-images) + (gnus-blocked-images)) shr-blocked-images)) (shr-content-function (lambda (id) (let ((handle (mm-get-content-id id))) === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2010-10-20 22:29:38 +0000 +++ lisp/gnus/nnimap.el 2010-10-21 01:23:34 +0000 @@ -881,7 +881,7 @@ (let ((message-id (message-field-value "message-id")) sequence message) (nnimap-add-cr) - (setq message (buffer-string)) + (setq message (buffer-substring-no-properties (point-min) (point-max))) (with-current-buffer (nnimap-buffer) (setq sequence (nnimap-send-command "APPEND %S {%d}" (utf7-encode group t) @@ -899,6 +899,17 @@ (cons group (nnimap-find-article-by-message-id group message-id)))))))) +(deffoo nnimap-request-replace-article (article group buffer) + (let (group-art) + (when (and (nnimap-possibly-change-group group nil) + ;; Put the article into the group. + (with-current-buffer buffer + (setq group-art + (nnimap-request-accept-article group nil t)))) + (nnimap-delete-article (list article)) + ;; Return the new article number. + (cdr group-art)))) + (defun nnimap-add-cr () (goto-char (point-min)) (while (re-search-forward "\r?\n" nil t) ------------------------------------------------------------ revno: 102022 committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2010-10-21 00:33:40 +0000 message: gnus.texi (RSS): Remove nnrss-wash-html-in-text-plain-parts. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2010-10-20 22:29:38 +0000 +++ doc/misc/ChangeLog 2010-10-21 00:33:40 +0000 @@ -1,3 +1,7 @@ +2010-10-21 Katsumi Yamaoka + + * gnus.texi (RSS): Remove nnrss-wash-html-in-text-plain-parts. + 2010-10-20 Lars Magne Ingebrigtsen * gnus.texi (HTML): Document the function value of === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2010-10-20 22:29:38 +0000 +++ doc/misc/gnus.texi 2010-10-21 00:33:40 +0000 @@ -17713,15 +17713,6 @@ the feeds from local files in @code{nnrss-directory}. You can use the command @code{nnrss-generate-download-script} to generate a download script using @command{wget}. - -@item nnrss-wash-html-in-text-plain-parts -Non-@code{nil} means that @code{nnrss} renders text in @samp{text/plain} -parts as @acronym{HTML}. The function specified by the -@code{mm-text-html-renderer} variable (@pxref{Display Customization, -,Display Customization, emacs-mime, The Emacs MIME Manual}) will be used -to render text. If it is @code{nil}, which is the default, text will -simply be folded. Leave it @code{nil} if you prefer to see -@samp{text/html} parts. @end table The following code may be helpful, if you want to show the description in ------------------------------------------------------------ revno: 102021 committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2010-10-21 00:27:32 +0000 message: nnrss.el (nnrss-wash-html-in-text-plain-parts): Remove. nnrss.el (nnrss-request-article): Don't use special html washing code. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-20 22:29:38 +0000 +++ lisp/gnus/ChangeLog 2010-10-21 00:27:32 +0000 @@ -1,3 +1,8 @@ +2010-10-21 Katsumi Yamaoka + + * nnrss.el (nnrss-wash-html-in-text-plain-parts): Remove. + (nnrss-request-article): Don't use special html washing code. + 2010-10-20 Katsumi Yamaoka * shr.el (shr-tag-table): Remove useless nconc. === modified file 'lisp/gnus/nnrss.el' --- lisp/gnus/nnrss.el 2010-10-20 22:29:38 +0000 +++ lisp/gnus/nnrss.el 2010-10-21 00:27:32 +0000 @@ -114,11 +114,6 @@ the car is what the data specify as the encoding. Or, the car is used for decoding when the cdr that the data specify is not available.") -(defvar nnrss-wash-html-in-text-plain-parts nil - "*Non-nil means render text in text/plain parts as HTML. -The function specified by the `mm-text-html-renderer' variable will be -used to render text. If it is nil, text will simply be folded.") - (nnoo-define-basics nnrss) ;;; Interface functions @@ -197,8 +192,6 @@ (deffoo nnrss-close-group (group &optional server) t) -(defvar mm-text-html-renderer) - (deffoo nnrss-request-article (article &optional group server buffer) (setq group (nnrss-decode-group-name group)) (when (stringp article) @@ -239,46 +232,25 @@ (when text (insert text) (goto-char body) - (if (and nnrss-wash-html-in-text-plain-parts - (progn - (require 'mm-view) - (setq fn (or (cdr (assq mm-text-html-renderer - mm-text-html-washer-alist)) - mm-text-html-renderer)))) - (progn - (narrow-to-region body (point-max)) - (if (functionp fn) - (funcall fn) - (apply (car fn) (cdr fn))) - (widen) - (goto-char body) - (re-search-forward "[^\t\n ]" nil t) - (beginning-of-line) - (delete-region body (point)) - (goto-char (point-max)) - (skip-chars-backward "\t\n ") - (end-of-line) - (delete-region (point) (point-max)) - (insert "\n")) - (while (re-search-forward "\n+" nil t) - (replace-match " ")) - (goto-char body) - ;; See `nnrss-check-group', which inserts "

". - (when (search-forward "

" nil t) - (if (eobp) - (replace-match "\n") - (replace-match "\n\n"))) - (unless (eobp) - (let ((fill-column (default-value 'fill-column)) - (window (get-buffer-window nntp-server-buffer))) - (when window - (setq fill-column - (max 1 (/ (* (window-width window) 7) 8)))) - (fill-region (point) (point-max)) - (goto-char (point-max)) - ;; XEmacs version of `fill-region' inserts newline. - (unless (bolp) - (insert "\n"))))) + (while (re-search-forward "\n+" nil t) + (replace-match " ")) + (goto-char body) + ;; See `nnrss-check-group', which inserts "

". + (when (search-forward "

" nil t) + (if (eobp) + (replace-match "\n") + (replace-match "\n\n"))) + (unless (eobp) + (let ((fill-column (default-value 'fill-column)) + (window (get-buffer-window nntp-server-buffer))) + (when window + (setq fill-column + (max 1 (/ (* (window-width window) 7) 8)))) + (fill-region (point) (point-max)) + (goto-char (point-max)) + ;; XEmacs version of `fill-region' inserts newline. + (unless (bolp) + (insert "\n")))) (when (or link enclosure) (insert "\n"))) (when link ------------------------------------------------------------ revno: 102020 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Wed 2010-10-20 22:29:38 +0000 message: Merge changes made in Gnus trunk. nnimap.el (nnimap-insert-partial-structure): Fix boundary detection. spam.el (spam-list-of-processors): Mark as obsolete. gnus-art.el (gnus-blocked-images): New function. Allow the `gnus-blocked-images' to be a function. gnus-art.el (gnus-article-wash-function): Remove it, and use `mm-text-html-renderer' instead. mm-decode.el (mm-inline-text-html-renderer): Removed. mm-decode.el (mm-inline-media-tests): Removed use. mm-view.el (mm-inline-text-html): Removed use. mm-view.el (mm-text-html-renderer-alist): Add the `shr' and `gnus-w3m' symbols. gnus.texi (Article Washing): shr and gnus-w3m, not the direct function names. gnus-art.el (article-wash-html): Simplify and remove the charset stuff. Use the normal html rendering code instead of the special html washing code. mm-view.el (mm-text-html-washer-alist): Removed. gnus-news.texi: Mention that mm-text-html-renderer is the only HTML variable now. shr.el (shr-tag-table): Remove useless nconc. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2010-10-20 10:31:10 +0000 +++ doc/misc/ChangeLog 2010-10-20 22:29:38 +0000 @@ -1,3 +1,9 @@ +2010-10-20 Lars Magne Ingebrigtsen + + * gnus.texi (HTML): Document the function value of + gnus-blocked-images. + (Article Washing): shr and gnus-w3m, not the direct function names. + 2010-10-20 Julien Danjou * emacs-mime.texi (Flowed text): Add a note about mml-enable-flowed === modified file 'doc/misc/gnus-news.texi' --- doc/misc/gnus-news.texi 2010-10-04 22:26:51 +0000 +++ doc/misc/gnus-news.texi 2010-10-20 22:29:38 +0000 @@ -124,6 +124,9 @@ @itemize @bullet +@item There's now only one variable that determines how @acronym{HTML} +is rendered: @code{mm-text-html-renderer}. + @item Gnus now supports sticky article buffers. Those are article buffers that are not reused when you select another article. @xref{Sticky Articles}. === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2010-10-19 23:06:50 +0000 +++ doc/misc/gnus.texi 2010-10-20 22:29:38 +0000 @@ -9803,19 +9803,16 @@ the charset defined in @code{gnus-summary-show-article-charset-alist} (@pxref{Paging the Article}) will be used. -@vindex gnus-article-wash-function The default is to use the function specified by @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display Customization, emacs-mime, The Emacs MIME Manual}) to convert the -@acronym{HTML}, but this is controlled by the -@code{gnus-article-wash-function} variable. Pre-defined functions you -can use include: +@acronym{HTML}. Pre-defined functions you can use include: @table @code -@item mm-shr +@item shr Use Gnus simple html renderer. -@item gnus-article-html +@item gnus-w3m Use Gnus rendered based on w3m. @item w3 @@ -12462,15 +12459,20 @@ @item gnus-blocked-images @vindex gnus-blocked-images -Images that have @acronym{URL}s that match this regexp won't be -fetched and displayed. For instance, do block all @acronym{URL}s that -have the string ``ads'' in them, do the following: +External images that have @acronym{URL}s that match this regexp won't +be fetched and displayed. For instance, do block all @acronym{URL}s +that have the string ``ads'' in them, do the following: @lisp (setq gnus-blocked-images "ads") @end lisp -The default is to block all external images. +This can also be a function to be evaluated. If so, it will be +called with the group name as the parameter. The default value is +@code{gnus-block-private-groups}, which will return @samp{"."} for +anything that isn't a newsgroup. This means that no external images +will be fetched as a result of reading mail, so that nobody can use +web bugs (and the like) to track whether you've read email. @item gnus-html-cache-directory @vindex gnus-html-cache-directory === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-20 10:34:58 +0000 +++ lisp/gnus/ChangeLog 2010-10-20 22:29:38 +0000 @@ -1,6 +1,33 @@ +2010-10-20 Katsumi Yamaoka + + * shr.el (shr-tag-table): Remove useless nconc. + +2010-10-20 Lars Magne Ingebrigtsen + + * gnus-art.el (article-wash-html): Simplify and remove the charset + stuff. Use the normal html rendering code instead of the special html + washing code. + + * mm-view.el (mm-text-html-renderer-alist): Add the `shr' and + `gnus-w3m' symbols. + (mm-text-html-washer-alist): Removed. + + * mm-decode.el (mm-inline-text-html-renderer): Removed. + (mm-inline-media-tests): Removed use. + (mm-text-html-renderer): Change default to the `shr' symbol. + + * mm-view.el (mm-inline-text-html): Removed use. + + * gnus-art.el (gnus-blocked-images): New function. Allow the + `gnus-blocked-images' to be a function. + (gnus-article-wash-function): Removed. + 2010-10-20 Julien Danjou + * spam.el (spam-list-of-processors): Mark as obsolete. + * nnimap.el (nnimap-request-article): Fix BODYSTRUCTURE retrieval. + (nnimap-insert-partial-structure): Fix boundary detection. 2010-10-20 Andreas Seltenreich === modified file 'lisp/gnus/gnus-art.el' --- lisp/gnus/gnus-art.el 2010-10-18 22:09:28 +0000 +++ lisp/gnus/gnus-art.el 2010-10-20 22:29:38 +0000 @@ -1621,9 +1621,6 @@ :type 'string :group 'mime-security) -(defvar gnus-article-wash-function nil - "Function used for converting HTML into text.") - (defcustom gnus-use-idna (and (condition-case nil (require 'idna) (file-error)) (mm-coding-system-p 'utf-8) (executable-find idna-program)) @@ -1639,8 +1636,11 @@ :group 'gnus-article :type 'boolean) -(defcustom gnus-blocked-images "." - "Images that have URLs matching this regexp will be blocked." +(defcustom gnus-blocked-images 'gnus-block-private-groups + "Images that have URLs matching this regexp will be blocked. +This can also be a function to be evaluated. If so, it will be +called with the group name as the parameter, and should return a +regexp." :version "24.1" :group 'gnus-art :type 'regexp) @@ -2694,118 +2694,16 @@ (when (interactive-p) (gnus-treat-article nil)))) - -(defun article-wash-html (&optional read-charset) - "Format an HTML article. -If READ-CHARSET, ask for a coding system. If it is a number, the -charset defined in `gnus-summary-show-article-charset-alist' is used." - (interactive "P") - (save-excursion - (let ((inhibit-read-only t) - charset) - (if read-charset - (if (or (and (numberp read-charset) - (setq charset - (cdr - (assq read-charset - gnus-summary-show-article-charset-alist)))) - (setq charset (mm-read-coding-system "Charset: "))) - (let ((gnus-summary-show-article-charset-alist - (list (cons 1 charset)))) - (with-current-buffer gnus-summary-buffer - (gnus-summary-show-article 1))) - (error "No charset is given")) - (when (gnus-buffer-live-p gnus-original-article-buffer) - (with-current-buffer gnus-original-article-buffer - (let* ((ct (gnus-fetch-field "content-type")) - (ctl (and ct (mail-header-parse-content-type ct)))) - (setq charset (and ctl - (mail-content-type-get ctl 'charset))) - (when (stringp charset) - (setq charset (intern (downcase charset))))))) - (unless charset - (setq charset gnus-newsgroup-charset))) - (article-goto-body) - (save-window-excursion - (save-restriction - (narrow-to-region (point) (point-max)) - (let* ((func (or gnus-article-wash-function mm-text-html-renderer)) - (entry (assq func mm-text-html-washer-alist))) - (when entry - (setq func (cdr entry))) - (cond - ((functionp func) - (funcall func)) - (t - (apply (car func) (cdr func)))))))))) - -;; External. -(declare-function w3-region "ext:w3-display" (st nd)) - -(defun gnus-article-wash-html-with-w3 () - "Wash the current buffer with w3." - (mm-setup-w3) - (let ((w3-strict-width (window-width)) - (url-standalone-mode t) - (url-gateway-unplugged t) - (w3-honor-stylesheets nil)) - (condition-case () - (w3-region (point-min) (point-max)) - (error)))) - -;; External. -(declare-function w3m-region "ext:w3m" (start end &optional url charset)) - -(defun gnus-article-wash-html-with-w3m () - "Wash the current buffer with emacs-w3m." - (mm-setup-w3m) - (let ((w3m-safe-url-regexp mm-w3m-safe-url-regexp) - w3m-force-redisplay) - (w3m-region (point-min) (point-max))) - ;; Put the mark meaning this part was rendered by emacs-w3m. - (put-text-property (point-min) (point-max) 'mm-inline-text-html-with-w3m t) - (when (and mm-inline-text-html-with-w3m-keymap - (boundp 'w3m-minor-mode-map) - w3m-minor-mode-map) - (if (and (boundp 'w3m-link-map) - w3m-link-map) - (let* ((start (point-min)) - (end (point-max)) - (on (get-text-property start 'w3m-href-anchor)) - (map (copy-keymap w3m-link-map)) - next) - (set-keymap-parent map w3m-minor-mode-map) - (while (< start end) - (if on - (progn - (setq next (or (text-property-any start end - 'w3m-href-anchor nil) - end)) - (put-text-property start next 'keymap map)) - (setq next (or (text-property-not-all start end - 'w3m-href-anchor nil) - end)) - (put-text-property start next 'keymap w3m-minor-mode-map)) - (setq start next - on (not on)))) - (put-text-property (point-min) (point-max) 'keymap w3m-minor-mode-map)))) - -(defvar charset) ;; Bound by `article-wash-html'. - -(defun gnus-article-wash-html-with-w3m-standalone () - "Wash the current buffer with w3m." - (if (mm-w3m-standalone-supports-m17n-p) - (progn - (unless (mm-coding-system-p charset) ;; Bound by `article-wash-html'. - ;; The default. - (setq charset 'iso-8859-1)) - (let ((coding-system-for-write charset) - (coding-system-for-read charset)) - (call-process-region - (point-min) (point-max) - "w3m" t t nil "-dump" "-T" "text/html" - "-I" (symbol-name charset) "-O" (symbol-name charset)))) - (mm-inline-wash-with-stdin nil "w3m" "-dump" "-T" "text/html"))) +(defun article-wash-html () + "Format an HTML article." + (interactive) + (let ((handles nil) + (buffer-read-only nil)) + (when (gnus-buffer-live-p gnus-original-article-buffer) + (setq handles (mm-dissect-buffer t t))) + (article-goto-body) + (delete-region (point) (point-max)) + (mm-inline-text-html handles))) (defvar gnus-article-browse-html-temp-list nil "List of temporary files created by `gnus-article-browse-html-parts'. @@ -6896,6 +6794,18 @@ (point)) (set-buffer buf)))))) +(defun gnus-block-private-groups (group) + (if (gnus-news-group-p group) + ;; Block nothing in news groups. + nil + ;; Block everything anywhere else. + ".")) + +(defun gnus-blocked-images () + (if (functionp gnus-blocked-images) + (funcall gnus-blocked-images gnus-newsgroup-name) + gnus-blocked-images)) + ;;; ;;; Article editing ;;; === modified file 'lisp/gnus/gnus-html.el' --- lisp/gnus/gnus-html.el 2010-10-07 06:47:37 +0000 +++ lisp/gnus/gnus-html.el 2010-10-20 22:29:38 +0000 @@ -205,8 +205,8 @@ url (if (buffer-live-p gnus-summary-buffer) (with-current-buffer gnus-summary-buffer - gnus-blocked-images) - gnus-blocked-images)) + (gnus-blocked-images)) + (gnus-blocked-images))) (progn (widget-convert-button 'link start end @@ -491,7 +491,7 @@ (defun gnus-html-prefetch-images (summary) (when (buffer-live-p summary) (let ((blocked-images (with-current-buffer summary - gnus-blocked-images))) + (gnus-blocked-images)))) (save-match-data (while (re-search-forward "]+src=[\"']\\([^\"']+\\)" nil t) (let ((url (gnus-html-encode-url (match-string 1)))) === modified file 'lisp/gnus/mm-decode.el' --- lisp/gnus/mm-decode.el 2010-10-14 01:17:30 +0000 +++ lisp/gnus/mm-decode.el 2010-10-20 22:29:38 +0000 @@ -105,8 +105,8 @@ ,disposition ,description ,cache ,id)) (defcustom mm-text-html-renderer - (cond ((fboundp 'libxml-parse-html-region) 'mm-shr) - ((executable-find "w3m") 'gnus-article-html) + (cond ((fboundp 'libxml-parse-html-region) 'shr) + ((executable-find "w3m") 'gnus-w3m) ((executable-find "links") 'links) ((executable-find "lynx") 'lynx) ((locate-library "w3") 'w3) @@ -115,8 +115,8 @@ "Render of HTML contents. It is one of defined renderer types, or a rendering function. The defined renderer types are: -`mm-shr': use Gnus simple HTML renderer; -`gnus-article-html' : use Gnus renderer based on w3m; +`shr': use Gnus simple HTML renderer; +`gnus-w3m' : use Gnus renderer based on w3m; `w3m' : use emacs-w3m; `w3m-standalone': use w3m; `links': use links; @@ -125,8 +125,8 @@ `html2text' : use html2text; nil : use external viewer (default web browser)." :version "24.1" - :type '(choice (const mm-shr) - (const gnus-article-html) + :type '(choice (const shr) + (const gnus-w3m) (const w3) (const w3m :tag "emacs-w3m") (const w3m-standalone :tag "standalone w3m" ) @@ -137,10 +137,6 @@ (function)) :group 'mime-display) -(defvar mm-inline-text-html-renderer nil - "Function used for rendering inline HTML contents. -It is suggested to customize `mm-text-html-renderer' instead.") - (defcustom mm-inline-text-html-with-images nil "If non-nil, Gnus will allow retrieving images in HTML contents with the tags. It has no effect on Emacs/w3. See also the @@ -245,8 +241,7 @@ ("text/html" mm-inline-text-html (lambda (handle) - (or mm-inline-text-html-renderer - mm-text-html-renderer))) + mm-text-html-renderer)) ("text/x-vcard" mm-inline-text-vcard (lambda (handle) === modified file 'lisp/gnus/mm-view.el' --- lisp/gnus/mm-view.el 2010-10-11 23:29:33 +0000 +++ lisp/gnus/mm-view.el 2010-10-20 22:29:38 +0000 @@ -50,29 +50,19 @@ (defvar w3m-minor-mode-map) (defvar mm-text-html-renderer-alist - '((w3 . mm-inline-text-html-render-with-w3) + '((shr . mm-shr) + (w3 . mm-inline-text-html-render-with-w3) (w3m . mm-inline-text-html-render-with-w3m) (w3m-standalone . mm-inline-text-html-render-with-w3m-standalone) + (gnus-w3m . gnus-article-html) (links mm-inline-render-with-file mm-links-remove-leading-blank "links" "-dump" file) - (lynx mm-inline-render-with-stdin nil - "lynx" "-dump" "-force_html" "-stdin" "-nolist") - (html2text mm-inline-render-with-function html2text)) + (lynx mm-inline-render-with-stdin nil + "lynx" "-dump" "-force_html" "-stdin" "-nolist") + (html2text mm-inline-render-with-function html2text)) "The attributes of renderer types for text/html.") -(defvar mm-text-html-washer-alist - '((w3 . gnus-article-wash-html-with-w3) - (w3m . gnus-article-wash-html-with-w3m) - (w3m-standalone . gnus-article-wash-html-with-w3m-standalone) - (links mm-inline-wash-with-file - mm-links-remove-leading-blank - "links" "-dump" file) - (lynx mm-inline-wash-with-stdin nil - "lynx" "-dump" "-force_html" "-stdin" "-nolist") - (html2text html2text)) - "The attributes of washer types for text/html.") - (defcustom mm-fill-flowed t "If non-nil a format=flowed article will be displayed flowed." :type 'boolean @@ -426,7 +416,7 @@ (buffer-string))))) (defun mm-inline-text-html (handle) - (let* ((func (or mm-inline-text-html-renderer mm-text-html-renderer)) + (let* ((func mm-text-html-renderer) (entry (assq func mm-text-html-renderer-alist)) (inhibit-read-only t)) (if entry === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2010-10-20 10:34:58 +0000 +++ lisp/gnus/nnimap.el 2010-10-20 22:29:38 +0000 @@ -565,9 +565,9 @@ (pop bstruc)) (setq type (car bstruc)) (setq bstruc (car (cdr bstruc))) - (when (and (stringp (car bstruc)) - (string= (downcase (car bstruc)) "boundary")) - (setq boundary (cadr bstruc)))) + (let ((has-boundary (member "boundary" bstruc))) + (when has-boundary + (setq boundary (cadr has-boundary))))) (when subp (insert (format "Content-type: multipart/%s; boundary=%S\n\n" (downcase type) boundary))) === modified file 'lisp/gnus/nnrss.el' --- lisp/gnus/nnrss.el 2010-10-11 23:29:33 +0000 +++ lisp/gnus/nnrss.el 2010-10-20 22:29:38 +0000 @@ -198,7 +198,6 @@ t) (defvar mm-text-html-renderer) -(defvar mm-text-html-washer-alist) (deffoo nnrss-request-article (article &optional group server buffer) (setq group (nnrss-decode-group-name group)) === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2010-10-20 12:24:49 +0000 +++ lisp/gnus/shr.el 2010-10-20 22:29:38 +0000 @@ -631,93 +631,92 @@ (nbody (if body (shr-max-columns body))) (nfooter (if footer (shr-max-columns footer)))) (shr-tag-table-1 - (nconc - (if caption - (if header - (if footer - ;; caption + hader + body + footer - (if (= nheader nbody) - (if (= nbody nfooter) - `((tr (td ,@caption)) - (tr (td (table (tbody ,@header ,@body ,@footer))))) - (if (= nfooter 1) - `((tr (td ,@caption)) - (tr (td (table (tbody ,@header ,@body)))) - ,@footer) - `((tr (td ,@caption)) - (tr (td (table (tbody ,@header ,@body)))) - (tr (td (table (tbody ,@footer))))))) - (if (= nbody nfooter) - `((tr (td ,@caption)) - (tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body ,@footer))))) - (if (= nfooter 1) - `((tr (td ,@caption)) - (tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body)))) - ,@footer) - `((tr (td ,@caption)) - (tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body)))) - (tr (td (table (tbody ,@footer)))))))) - ;; caption + header + body - (if (= nheader nbody) - `((tr (td ,@caption)) - (tr (td (table (tbody ,@header ,@body))))) - (if (= nheader 1) - `((tr (td ,@caption)) - ,@header (tr (td (table (tbody ,@body))))) - `((tr (td ,@caption)) - (tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body)))))))) - (if footer - ;; caption + body + footer - (if (= nbody nfooter) - `((tr (td (table (tbody ,@body ,@footer))))) - (if (= nfooter 1) - `((tr (td (table (tbody ,@body)))) ,@footer) - `((tr (td (table (tbody ,@body)))) - (tr (td (table (tbody ,@footer))))))) - ;; caption + body - `((tr (td ,@caption)) - (tr (td (table (tbody ,@body))))))) - (if header - (if footer - ;; header + body + footer - (if (= nheader nbody) - (if (= nbody nfooter) - `((tr (td (table (tbody ,@header ,@body ,@footer))))) - (if (= nfooter 1) - `((tr (td (table (tbody ,@header ,@body)))) - ,@footer) - `((tr (td (table (tbody ,@header ,@body)))) - (tr (td (table (tbody ,@footer))))))) - (if (= nbody nfooter) - `((tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body ,@footer))))) - (if (= nfooter 1) - `((tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body)))) - ,@footer) - `((tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body)))) - (tr (td (table (tbody ,@footer)))))))) - ;; header + body - (if (= nheader nbody) - `((tr (td (table (tbody ,@header ,@body))))) - (if (= nheader 1) - `(,@header (tr (td (table (tbody ,@body))))) - `((tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body)))))))) - (if footer - ;; body + footer - (if (= nbody nfooter) - `((tr (td (table (tbody ,@body ,@footer))))) - (if (= nfooter 1) - `((tr (td (table (tbody ,@body)))) ,@footer) - `((tr (td (table (tbody ,@body)))) - (tr (td (table (tbody ,@footer))))))) - body))))))) + (if caption + (if header + (if footer + ;; caption + hader + body + footer + (if (= nheader nbody) + (if (= nbody nfooter) + `((tr (td ,@caption)) + (tr (td (table (tbody ,@header ,@body ,@footer))))) + (if (= nfooter 1) + `((tr (td ,@caption)) + (tr (td (table (tbody ,@header ,@body)))) + ,@footer) + `((tr (td ,@caption)) + (tr (td (table (tbody ,@header ,@body)))) + (tr (td (table (tbody ,@footer))))))) + (if (= nbody nfooter) + `((tr (td ,@caption)) + (tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body ,@footer))))) + (if (= nfooter 1) + `((tr (td ,@caption)) + (tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body)))) + ,@footer) + `((tr (td ,@caption)) + (tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body)))) + (tr (td (table (tbody ,@footer)))))))) + ;; caption + header + body + (if (= nheader nbody) + `((tr (td ,@caption)) + (tr (td (table (tbody ,@header ,@body))))) + (if (= nheader 1) + `((tr (td ,@caption)) + ,@header (tr (td (table (tbody ,@body))))) + `((tr (td ,@caption)) + (tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body)))))))) + (if footer + ;; caption + body + footer + (if (= nbody nfooter) + `((tr (td (table (tbody ,@body ,@footer))))) + (if (= nfooter 1) + `((tr (td (table (tbody ,@body)))) ,@footer) + `((tr (td (table (tbody ,@body)))) + (tr (td (table (tbody ,@footer))))))) + ;; caption + body + `((tr (td ,@caption)) + (tr (td (table (tbody ,@body))))))) + (if header + (if footer + ;; header + body + footer + (if (= nheader nbody) + (if (= nbody nfooter) + `((tr (td (table (tbody ,@header ,@body ,@footer))))) + (if (= nfooter 1) + `((tr (td (table (tbody ,@header ,@body)))) + ,@footer) + `((tr (td (table (tbody ,@header ,@body)))) + (tr (td (table (tbody ,@footer))))))) + (if (= nbody nfooter) + `((tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body ,@footer))))) + (if (= nfooter 1) + `((tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body)))) + ,@footer) + `((tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body)))) + (tr (td (table (tbody ,@footer)))))))) + ;; header + body + (if (= nheader nbody) + `((tr (td (table (tbody ,@header ,@body))))) + (if (= nheader 1) + `(,@header (tr (td (table (tbody ,@body))))) + `((tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body)))))))) + (if footer + ;; body + footer + (if (= nbody nfooter) + `((tr (td (table (tbody ,@body ,@footer))))) + (if (= nfooter 1) + `((tr (td (table (tbody ,@body)))) ,@footer) + `((tr (td (table (tbody ,@body)))) + (tr (td (table (tbody ,@footer))))))) + body)))))) (defun shr-find-elements (cont type) (let (result) === modified file 'lisp/gnus/spam.el' --- lisp/gnus/spam.el 2010-10-11 23:29:33 +0000 +++ lisp/gnus/spam.el 2010-10-20 22:29:38 +0000 @@ -1287,6 +1287,7 @@ classification and spam-use-* check variable are used. This is superseded by the new spam backend code, so it's only consulted for backwards compatibility.") +(make-obsolete-variable 'spam-list-of-processors nil "22.1") (defun spam-group-processor-p (group backend &optional classification) "Checks if GROUP has a BACKEND with CLASSIFICATION registered. ------------------------------------------------------------ revno: 102019 committer: Katsumi Yamaoka branch nick: trunk timestamp: Wed 2010-10-20 12:24:49 +0000 message: shr.el (shr-tag-table): Fix last change. diff: === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2010-10-20 07:31:25 +0000 +++ lisp/gnus/shr.el 2010-10-20 12:24:49 +0000 @@ -632,44 +632,92 @@ (nfooter (if footer (shr-max-columns footer)))) (shr-tag-table-1 (nconc - (if caption `((tr (td ,@caption)))) - (if header - (if footer - ;; header + body + footer - (if (= nheader nbody) + (if caption + (if header + (if footer + ;; caption + hader + body + footer + (if (= nheader nbody) + (if (= nbody nfooter) + `((tr (td ,@caption)) + (tr (td (table (tbody ,@header ,@body ,@footer))))) + (if (= nfooter 1) + `((tr (td ,@caption)) + (tr (td (table (tbody ,@header ,@body)))) + ,@footer) + `((tr (td ,@caption)) + (tr (td (table (tbody ,@header ,@body)))) + (tr (td (table (tbody ,@footer))))))) + (if (= nbody nfooter) + `((tr (td ,@caption)) + (tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body ,@footer))))) + (if (= nfooter 1) + `((tr (td ,@caption)) + (tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body)))) + ,@footer) + `((tr (td ,@caption)) + (tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body)))) + (tr (td (table (tbody ,@footer)))))))) + ;; caption + header + body + (if (= nheader nbody) + `((tr (td ,@caption)) + (tr (td (table (tbody ,@header ,@body))))) + (if (= nheader 1) + `((tr (td ,@caption)) + ,@header (tr (td (table (tbody ,@body))))) + `((tr (td ,@caption)) + (tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body)))))))) + (if footer + ;; caption + body + footer + (if (= nbody nfooter) + `((tr (td (table (tbody ,@body ,@footer))))) + (if (= nfooter 1) + `((tr (td (table (tbody ,@body)))) ,@footer) + `((tr (td (table (tbody ,@body)))) + (tr (td (table (tbody ,@footer))))))) + ;; caption + body + `((tr (td ,@caption)) + (tr (td (table (tbody ,@body))))))) + (if header + (if footer + ;; header + body + footer + (if (= nheader nbody) + (if (= nbody nfooter) + `((tr (td (table (tbody ,@header ,@body ,@footer))))) + (if (= nfooter 1) + `((tr (td (table (tbody ,@header ,@body)))) + ,@footer) + `((tr (td (table (tbody ,@header ,@body)))) + (tr (td (table (tbody ,@footer))))))) (if (= nbody nfooter) - `((tr (td (table (tbody ,@header ,@body ,@footer))))) + `((tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body ,@footer))))) (if (= nfooter 1) - `((tr (td (table (tbody ,@header ,@body)))) + `((tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body)))) ,@footer) - `((tr (td (table (tbody ,@header ,@body)))) - (tr (td (table (tbody ,@footer))))))) - (if (= nbody nfooter) - `((tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body ,@footer))))) - (if (= nfooter 1) `((tr (td (table (tbody ,@header)))) (tr (td (table (tbody ,@body)))) - ,@footer) - `((tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body)))) - (tr (td (table (tbody ,@footer)))))))) - ;; header + body - (if (= nheader nbody) - `((tr (td (table (tbody ,@header ,@body))))) - (if (= nheader 1) - `(,@header (tr (td (table (tbody ,@body))))) - `((tr (td (table (tbody ,@header)))) - (tr (td (table (tbody ,@body)))))))) - (if footer - ;; body + footer - (if (= nbody nfooter) - `((tr (td (table (tbody ,@body ,@footer))))) - (if (= nfooter 1) - `((tr (td (table (tbody ,@body)))) ,@footer) - `((tr (td (table (tbody ,@body)))) - (tr (td (table (tbody ,@footer))))))) - body)))))) + (tr (td (table (tbody ,@footer)))))))) + ;; header + body + (if (= nheader nbody) + `((tr (td (table (tbody ,@header ,@body))))) + (if (= nheader 1) + `(,@header (tr (td (table (tbody ,@body))))) + `((tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body)))))))) + (if footer + ;; body + footer + (if (= nbody nfooter) + `((tr (td (table (tbody ,@body ,@footer))))) + (if (= nfooter 1) + `((tr (td (table (tbody ,@body)))) ,@footer) + `((tr (td (table (tbody ,@body)))) + (tr (td (table (tbody ,@footer))))))) + body))))))) (defun shr-find-elements (cont type) (let (result) ------------------------------------------------------------ revno: 102018 author: Julien Danjou committer: Katsumi Yamaoka branch nick: trunk timestamp: Wed 2010-10-20 10:34:58 +0000 message: nnimap.el (nnimap-request-article): Fix BODYSTRUCTURE retrieval. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-20 10:31:10 +0000 +++ lisp/gnus/ChangeLog 2010-10-20 10:34:58 +0000 @@ -1,3 +1,7 @@ +2010-10-20 Julien Danjou + + * nnimap.el (nnimap-request-article): Fix BODYSTRUCTURE retrieval. + 2010-10-20 Andreas Seltenreich * gnus-draft.el (gnus-draft-check-draft-articles): Don't unnecessarily === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2010-10-19 00:13:27 +0000 +++ lisp/gnus/nnimap.el 2010-10-20 10:34:58 +0000 @@ -477,7 +477,7 @@ (let ((start (point))) (forward-sexp 1) (downcase-region start (point)) - (goto-char (point)) + (goto-char start) (read (current-buffer)))) parts (nnimap-find-wanted-parts structure)))) (when (if parts ------------------------------------------------------------ revno: 102017 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Wed 2010-10-20 10:31:10 +0000 message: emacs-mime.texi (Flowed text): Add a note about mml-enable-flowed variable. gnus/ChangeLog (2010-10-15): Fix typo in changelog. gnus-draft.el (gnus-draft-check-draft-articles): Don't unnecessarily run file-truename on remote files when checking drafts. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2010-10-19 23:06:50 +0000 +++ doc/misc/ChangeLog 2010-10-20 10:31:10 +0000 @@ -1,3 +1,8 @@ +2010-10-20 Julien Danjou + + * emacs-mime.texi (Flowed text): Add a note about mml-enable-flowed + variable. + 2010-10-19 Lars Magne Ingebrigtsen * gnus.texi (Customizing the IMAP Connection): The port strings are === modified file 'doc/misc/emacs-mime.texi' --- doc/misc/emacs-mime.texi 2010-10-04 00:17:16 +0000 +++ doc/misc/emacs-mime.texi 2010-10-20 10:31:10 +0000 @@ -1040,6 +1040,10 @@ newline characters are not present in the buffer, no flow encoding occurs. +You can customize the value of the @code{mml-enable-flowed} variable +to enable or disable the flowed encoding usage when newline +characteres are present in the buffer. + On decoding flowed text, lines with soft newline characters are filled together and wrapped after the column decided by @code{fill-flowed-display-column}. The default is to wrap after === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-20 07:31:25 +0000 +++ lisp/gnus/ChangeLog 2010-10-20 10:31:10 +0000 @@ -1,3 +1,10 @@ +2010-10-20 Andreas Seltenreich + + * gnus-draft.el (gnus-draft-check-draft-articles): Don't unnecessarily + run file-truename on remote files. This can be expensive and even + prevent one from editing drafts if some unrelated buffer has a stale + connection. + 2010-10-20 Katsumi Yamaoka * shr.el (shr-find-fill-point): Shorten line if the preceding char is @@ -109,8 +116,8 @@ 2010-10-15 Julien Danjou - * mml.el (mml-generate-mime-1): Add `mml-enable-flow' variable to add a - possibility to disable format=flow encoding when using hard newlines. + * mml.el (mml-generate-mime-1): Add `mml-enable-flowed' variable to add + a possibility to disable format=flow encoding when using hard newlines. 2010-10-15 Katsumi Yamaoka === modified file 'lisp/gnus/gnus-draft.el' --- lisp/gnus/gnus-draft.el 2010-09-02 00:55:51 +0000 +++ lisp/gnus/gnus-draft.el 2010-10-20 10:31:10 +0000 @@ -310,6 +310,8 @@ (while buffs (set-buffer (setq buff (pop buffs))) (if (and buffer-file-name + (equal (file-remote-p file) + (file-remote-p buffer-file-name)) (string-equal (file-truename buffer-file-name) (file-truename file)) (buffer-modified-p)) ------------------------------------------------------------ revno: 102016 committer: Katsumi Yamaoka branch nick: trunk timestamp: Wed 2010-10-20 07:31:25 +0000 message: shr.el: (shr-tag-table): Support caption, thead, and tfoot. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-20 00:44:28 +0000 +++ lisp/gnus/ChangeLog 2010-10-20 07:31:25 +0000 @@ -2,6 +2,8 @@ * shr.el (shr-find-fill-point): Shorten line if the preceding char is kinsoku-eol regardless of shr-kinsoku-shorten. + (shr-tag-table-1): Rename from shr-tag-table; make it a subroutine. + (shr-tag-table): Support caption, thead, and tfoot. 2010-10-19 Lars Magne Ingebrigtsen === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2010-10-20 00:44:28 +0000 +++ lisp/gnus/shr.el 2010-10-20 07:31:25 +0000 @@ -593,8 +593,7 @@ ;; main buffer). Now we know how much space each TD really takes, so ;; we then render everything again with the new widths, and finally ;; insert all these boxes into the main buffer. -(defun shr-tag-table (cont) - (shr-ensure-paragraph) +(defun shr-tag-table-1 (cont) (setq cont (or (cdr (assq 'tbody cont)) cont)) (let* ((shr-inhibit-images t) @@ -622,6 +621,56 @@ (dolist (elem (shr-find-elements cont 'img)) (shr-tag-img (cdr elem)))) +(defun shr-tag-table (cont) + (shr-ensure-paragraph) + (let* ((caption (cdr (assq 'caption cont))) + (header (cdr (assq 'thead cont))) + (body (or (cdr (assq 'tbody cont)) cont)) + (footer (cdr (assq 'tfoot cont))) + (nheader (if header (shr-max-columns header))) + (nbody (if body (shr-max-columns body))) + (nfooter (if footer (shr-max-columns footer)))) + (shr-tag-table-1 + (nconc + (if caption `((tr (td ,@caption)))) + (if header + (if footer + ;; header + body + footer + (if (= nheader nbody) + (if (= nbody nfooter) + `((tr (td (table (tbody ,@header ,@body ,@footer))))) + (if (= nfooter 1) + `((tr (td (table (tbody ,@header ,@body)))) + ,@footer) + `((tr (td (table (tbody ,@header ,@body)))) + (tr (td (table (tbody ,@footer))))))) + (if (= nbody nfooter) + `((tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body ,@footer))))) + (if (= nfooter 1) + `((tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body)))) + ,@footer) + `((tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body)))) + (tr (td (table (tbody ,@footer)))))))) + ;; header + body + (if (= nheader nbody) + `((tr (td (table (tbody ,@header ,@body))))) + (if (= nheader 1) + `(,@header (tr (td (table (tbody ,@body))))) + `((tr (td (table (tbody ,@header)))) + (tr (td (table (tbody ,@body)))))))) + (if footer + ;; body + footer + (if (= nbody nfooter) + `((tr (td (table (tbody ,@body ,@footer))))) + (if (= nfooter 1) + `((tr (td (table (tbody ,@body)))) ,@footer) + `((tr (td (table (tbody ,@body)))) + (tr (td (table (tbody ,@footer))))))) + body)))))) + (defun shr-find-elements (cont type) (let (result) (dolist (elem cont) ------------------------------------------------------------ revno: 102015 committer: Glenn Morris branch nick: trunk timestamp: Tue 2010-10-19 20:55:30 -0700 message: * make-dist: No longer create lisp/MANIFEST. No-one can remember what this file was for. http://lists.gnu.org/archive/html/emacs-devel/2010-10/msg00512.html diff: === modified file 'ChangeLog' --- ChangeLog 2010-10-14 14:32:27 +0000 +++ ChangeLog 2010-10-20 03:55:30 +0000 @@ -1,3 +1,7 @@ +2010-10-20 Glenn Morris + + * make-dist: No longer create lisp/MANIFEST. + 2010-10-14 Glenn Morris * BUGS, INSTALL.BZR, README: Updates. === modified file 'make-dist' --- make-dist 2010-10-13 03:17:59 +0000 +++ make-dist 2010-10-20 03:55:30 +0000 @@ -270,18 +270,6 @@ $EMACS -batch -f batch-byte-recompile-directory lisp leim fi -## What is this file for? It goes in srcdir, not the tarfile. -## Why does it exclude term/ ? -echo "Making lisp/MANIFEST" - -files=`find lisp -type f -name '*.el'` -for file in $files; do - case "$file" in - */subdirs.el|*/default.el|*/loaddefs.el|*/term/*) continue ;; - esac - sed -n 's/^;;; //p; q' $file -done | sort > lisp/MANIFEST - echo "Creating staging directory: \`${tempparent}'" mkdir ${tempparent}