+2012-07-27 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * message.el (message-kill-address): Don't kill last newline.
+ (message-skip-to-next-address): Don't move to the next header.
+ (message-fill-field-address): Work properly.
+
2012-07-25 Julien Danjou <julien@danjou.info>
* gnus-art.el (gnus-kill-sticky-article-buffers): Reintroduce.
(interactive)
(let ((start (point)))
(message-skip-to-next-address)
- (kill-region start (point))))
+ (kill-region start (if (bolp) (1- (point)) (point)))))
(autoload 'Info-goto-node "info")
(while (and (not (= (point) end))
(or (not (eq char ?,))
quoted))
- (skip-chars-forward "^,\"" (point-max))
+ (skip-chars-forward "^,\"" end)
(when (eq (setq char (following-char)) ?\")
(setq quoted (not quoted)))
(unless (= (point) end)
(point-max))))
(defun message-fill-field-address ()
- (while (not (eobp))
- (message-skip-to-next-address)
- (let (last)
- (if (and (> (current-column) 78)
- last)
- (progn
- (save-excursion
- (goto-char last)
- (insert "\n\t"))
- (setq last (1+ (point))))
- (setq last (1+ (point)))))))
+ (let (end last)
+ (while (not end)
+ (message-skip-to-next-address)
+ (cond ((bolp)
+ (end-of-line 0)
+ (setq end 1))
+ ((eobp)
+ (setq end 0)))
+ (when (and (> (current-column) 78)
+ last)
+ (save-excursion
+ (goto-char last)
+ (delete-char (- (skip-chars-backward " \t")))
+ (insert "\n\t")))
+ (setq last (point)))
+ (forward-line end)))
(defun message-fill-field-general ()
(let ((begin (point))