Mercurial > emacs
changeset 110917:3243e7055d49
Merge changes made in Gnus trunk.
shr.el (shr-tag-hr): Use shr-hr-line to specify which character to use to display hr lines.
shr.el (shr-max-columns): Do not change state to nil if we just inserting spaces.
sieve-manage.el (sieve-manage-open): Allow port names as well as port numbers.
shr.el (shr-current-column, shr-find-fill-point): New functions; start thinking about breaking CJVK text.
nnimap.el (nnimap-transform-split-mail): Not all articles have bodies. Protect against this.
shr.el (shr-insert): Fix up the white space only regexp.
nnimap.el (nnimap-request-rename-group): Select group read-only before renaming it.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Mon, 11 Oct 2010 22:27:28 +0000 |
parents | 65a8bf3768b2 |
children | 236342431786 |
files | lisp/gnus/ChangeLog lisp/gnus/nnimap.el lisp/gnus/shr.el lisp/gnus/sieve-manage.el |
diffstat | 4 files changed, 65 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog Mon Oct 11 11:02:17 2010 +0000 +++ b/lisp/gnus/ChangeLog Mon Oct 11 22:27:28 2010 +0000 @@ -1,3 +1,29 @@ +2010-10-11 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * nnimap.el (nnimap-request-rename-group): Select group read-only + before renaming it. + + * shr.el (shr-insert): Fix up the white space only regexp. + + * nnimap.el (nnimap-transform-split-mail): Not all articles have + bodies. Protect against this. Reported by Michael Welsh Duggan. + + * shr.el (shr-current-column): New function. + (shr-find-fill-point): New function. + +2010-10-11 Michael Welsh Duggan <md5i@md5i.com> (tiny change) + + * sieve-manage.el (sieve-manage-open): Allow port names as well as port + numbers. + +2010-10-11 Julien Danjou <julien@danjou.info> + + * shr.el (shr-hr-line): Add. + (shr-tag-hr): Use shr-hr-line to specify which character to use to + display hr lines. + (shr-max-columns): Do not change state to nil if we just inserting + spaces. + 2010-10-11 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-topic.el (gnus-topic-read-group): If after the last group,
--- a/lisp/gnus/nnimap.el Mon Oct 11 11:02:17 2010 +0000 +++ b/lisp/gnus/nnimap.el Mon Oct 11 22:27:28 2010 +0000 @@ -667,6 +667,9 @@ (deffoo nnimap-request-rename-group (group new-name &optional server) (when (nnimap-possibly-change-group nil server) (with-current-buffer (nnimap-buffer) + ;; Make sure we don't have this group open read/write. + (nnimap-command "EXAMINE %S" (utf7-encode group 7)) + (setf (nnimap-group nnimap-object) nil) (car (nnimap-command "RENAME %S %S" (utf7-encode group t) (utf7-encode new-name t)))))) @@ -1627,8 +1630,10 @@ (forward-char (1+ bytes)) (setq bytes (nnimap-get-length)) (delete-region (line-beginning-position) (line-end-position)) - (forward-char (1+ bytes)) - (delete-region (line-beginning-position) (line-end-position)))))) + ;; There's a body; skip past that. + (when bytes + (forward-char (1+ bytes)) + (delete-region (line-beginning-position) (line-end-position))))))) (defun nnimap-dummy-active-number (group &optional server) 1)
--- a/lisp/gnus/shr.el Mon Oct 11 11:02:17 2010 +0000 +++ b/lisp/gnus/shr.el Mon Oct 11 22:27:28 2010 +0000 @@ -59,7 +59,12 @@ :type 'char) (defcustom shr-table-corner ?+ - "Charater used to draw table corner." + "Character used to draw table corner." + :group 'shr + :type 'char) + +(defcustom shr-hr-line ?- + "Character used to draw hr line." :group 'shr :type 'char) @@ -188,7 +193,8 @@ (shr-descend sub))))) (defun shr-insert (text) - (when (eq shr-state 'image) + (when (and (eq shr-state 'image) + (not (string-match "\\`[ \t\n]+\\'" text))) (insert "\n") (setq shr-state nil)) (cond @@ -211,7 +217,7 @@ (unless shr-start (setq shr-start (point))) (insert elem) - (when (> (current-column) shr-width) + (when (> (shr-current-column) shr-width) (if (not (search-backward " " (line-beginning-position) t)) (insert "\n") (delete-char 1) @@ -224,6 +230,26 @@ (unless (string-match "[ \t\n]\\'" text) (delete-char -1)))))) +(defun shr-find-fill-point () + (let ((found nil)) + (while (and (not found) + (not (bolp))) + (when (or (eq (preceding-char) ? ) + (aref fill-find-break-point-function-table (preceding-char))) + (setq found (point))) + (backward-char 1)) + (or found + (end-of-line)))) + +(defun shr-current-column () + (let ((column 0)) + (save-excursion + (beginning-of-line) + (while (not (eolp)) + (incf column (char-width (following-char))) + (forward-char 1))) + column)) + (defun shr-ensure-newline () (unless (zerop (current-column)) (insert "\n"))) @@ -468,7 +494,7 @@ (defun shr-tag-hr (cont) (shr-ensure-newline) - (insert (make-string shr-width ?-) "\n")) + (insert (make-string shr-width shr-hr-line) "\n")) ;;; Table rendering algorithm.
--- a/lisp/gnus/sieve-manage.el Mon Oct 11 11:02:17 2010 +0000 +++ b/lisp/gnus/sieve-manage.el Mon Oct 11 22:27:28 2010 +0000 @@ -150,7 +150,7 @@ :group 'sieve-manage) (defcustom sieve-manage-default-port 2000 - "Default port number for managesieve protocol." + "Default port number or service name for managesieve protocol." :type 'integer :group 'sieve-manage) @@ -389,7 +389,7 @@ If nil, chooses the best stream the server is capable of. Optional argument BUFFER is buffer (buffer, or string naming buffer) to work in." - (setq buffer (or buffer (format " *sieve* %s:%d" server (or port sieve-manage-default-port)))) + (setq buffer (or buffer (format " *sieve* %s:%s" server (or port sieve-manage-default-port)))) (with-current-buffer (get-buffer-create buffer) (mapc 'make-local-variable sieve-manage-local-variables) (sieve-manage-disable-multibyte)