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.
+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,
(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))))))
(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)
: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)
(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
(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)
(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")))
(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.
: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)
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)