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.
This commit is contained in:
Gnus developers 2010-10-11 22:27:28 +00:00 committed by Katsumi Yamaoka
parent 6ec07c5ad9
commit 6b7df8d3dd
4 changed files with 65 additions and 8 deletions

View file

@ -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,

View file

@ -667,6 +667,9 @@ textual parts.")
(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 @@ textual parts.")
(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)

View file

@ -59,7 +59,12 @@ fit these criteria."
: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 @@ redirects somewhere else."
(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 @@ redirects somewhere else."
(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 @@ redirects somewhere else."
(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 @@ Return a string with image data."
(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.

View file

@ -150,7 +150,7 @@ for doing the actual authentication."
: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 @@ Optional argument AUTH indicates authenticator to use, see
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)