diff options
| author | Katsumi Yamaoka | 2012-07-27 08:01:44 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2012-07-27 08:01:44 +0000 |
| commit | 0000d0d54bb9cbc835172d9f5f8ff7595786af62 (patch) | |
| tree | ee95719f03acc3c36bf1de551199ab2b201fe9ab | |
| parent | 86332df22ae3934334c7ced64aa6aedd5767b121 (diff) | |
| download | emacs-0000d0d54bb9cbc835172d9f5f8ff7595786af62.tar.gz emacs-0000d0d54bb9cbc835172d9f5f8ff7595786af62.zip | |
message.el: Make header fill function work properly
| -rw-r--r-- | lisp/gnus/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 31 |
2 files changed, 24 insertions, 13 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 83cb55d3594..80ede10c8c4 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-07-27 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * message.el (message-kill-address): Don't kill last newline. | ||
| 4 | (message-skip-to-next-address): Don't move to the next header. | ||
| 5 | (message-fill-field-address): Work properly. | ||
| 6 | |||
| 1 | 2012-07-25 Julien Danjou <julien@danjou.info> | 7 | 2012-07-25 Julien Danjou <julien@danjou.info> |
| 2 | 8 | ||
| 3 | * gnus-art.el (gnus-kill-sticky-article-buffers): Reintroduce. | 9 | * gnus-art.el (gnus-kill-sticky-article-buffers): Reintroduce. |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index ecc797314c4..e56a6c6d078 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -2603,7 +2603,7 @@ Point is left at the beginning of the narrowed-to region." | |||
| 2603 | (interactive) | 2603 | (interactive) |
| 2604 | (let ((start (point))) | 2604 | (let ((start (point))) |
| 2605 | (message-skip-to-next-address) | 2605 | (message-skip-to-next-address) |
| 2606 | (kill-region start (point)))) | 2606 | (kill-region start (if (bolp) (1- (point)) (point))))) |
| 2607 | 2607 | ||
| 2608 | 2608 | ||
| 2609 | (autoload 'Info-goto-node "info") | 2609 | (autoload 'Info-goto-node "info") |
| @@ -6099,7 +6099,7 @@ Headers already prepared in the buffer are not modified." | |||
| 6099 | (while (and (not (= (point) end)) | 6099 | (while (and (not (= (point) end)) |
| 6100 | (or (not (eq char ?,)) | 6100 | (or (not (eq char ?,)) |
| 6101 | quoted)) | 6101 | quoted)) |
| 6102 | (skip-chars-forward "^,\"" (point-max)) | 6102 | (skip-chars-forward "^,\"" end) |
| 6103 | (when (eq (setq char (following-char)) ?\") | 6103 | (when (eq (setq char (following-char)) ?\") |
| 6104 | (setq quoted (not quoted))) | 6104 | (setq quoted (not quoted))) |
| 6105 | (unless (= (point) end) | 6105 | (unless (= (point) end) |
| @@ -6136,17 +6136,22 @@ If the current line has `message-yank-prefix', insert it on the new line." | |||
| 6136 | (point-max)))) | 6136 | (point-max)))) |
| 6137 | 6137 | ||
| 6138 | (defun message-fill-field-address () | 6138 | (defun message-fill-field-address () |
| 6139 | (while (not (eobp)) | 6139 | (let (end last) |
| 6140 | (message-skip-to-next-address) | 6140 | (while (not end) |
| 6141 | (let (last) | 6141 | (message-skip-to-next-address) |
| 6142 | (if (and (> (current-column) 78) | 6142 | (cond ((bolp) |
| 6143 | last) | 6143 | (end-of-line 0) |
| 6144 | (progn | 6144 | (setq end 1)) |
| 6145 | (save-excursion | 6145 | ((eobp) |
| 6146 | (goto-char last) | 6146 | (setq end 0))) |
| 6147 | (insert "\n\t")) | 6147 | (when (and (> (current-column) 78) |
| 6148 | (setq last (1+ (point)))) | 6148 | last) |
| 6149 | (setq last (1+ (point))))))) | 6149 | (save-excursion |
| 6150 | (goto-char last) | ||
| 6151 | (delete-char (- (skip-chars-backward " \t"))) | ||
| 6152 | (insert "\n\t"))) | ||
| 6153 | (setq last (point))) | ||
| 6154 | (forward-line end))) | ||
| 6150 | 6155 | ||
| 6151 | (defun message-fill-field-general () | 6156 | (defun message-fill-field-general () |
| 6152 | (let ((begin (point)) | 6157 | (let ((begin (point)) |