diff options
| author | Lars Ingebrigtsen | 2011-02-01 03:54:46 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2011-02-01 03:54:46 +0000 |
| commit | abb97fbbedcd84a13bae7b7b70251514bf97cdbb (patch) | |
| tree | 632dd80df206c85a4a3654782f2d7b9cd495e3c7 | |
| parent | 8c9da040de3b584cca9a41292d7a8b34818ae21a (diff) | |
| download | emacs-abb97fbbedcd84a13bae7b7b70251514bf97cdbb.tar.gz emacs-abb97fbbedcd84a13bae7b7b70251514bf97cdbb.zip | |
shr.el (shr-render-td): Only do colours at the final rendering. Should be slightly faster.
(shr-insert-table): Fix up TD background colours when doing the vertical padding.
gnus-art.el (article-update-date-lapsed): Don't use current-column to find the horizontal position. It's fragile in the presence of \003 characters.
| -rw-r--r-- | lisp/gnus/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/shr.el | 22 |
3 files changed, 21 insertions, 10 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 9c94a2ba2fa..bade634abd6 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,7 +1,14 @@ | |||
| 1 | 2011-02-01 Lars Ingebrigtsen <larsi@gnus.org> | 1 | 2011-02-01 Lars Ingebrigtsen <larsi@gnus.org> |
| 2 | 2 | ||
| 3 | * shr.el (shr-render-td): Only do colours at the final rendering. | ||
| 4 | Should be slightly faster. | ||
| 5 | (shr-insert-table): Fix up TD background colours when doing the | ||
| 6 | vertical padding. | ||
| 7 | |||
| 3 | * gnus-art.el (article-date-ut): Protect against articles with no Date | 8 | * gnus-art.el (article-date-ut): Protect against articles with no Date |
| 4 | header. | 9 | header. |
| 10 | (article-update-date-lapsed): Don't use current-column to find the | ||
| 11 | horizontal position. It's fragile in the presence of \003 characters. | ||
| 5 | 12 | ||
| 6 | * gnus-start.el (gnus-read-active-file-1): Remove dead parameter infos. | 13 | * gnus-start.el (gnus-read-active-file-1): Remove dead parameter infos. |
| 7 | 14 | ||
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 07eabd98a6d..af47daf970b 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -3645,7 +3645,7 @@ function and want to see what the date was before converting." | |||
| 3645 | (set-buffer (window-buffer w)) | 3645 | (set-buffer (window-buffer w)) |
| 3646 | (when (eq major-mode 'gnus-article-mode) | 3646 | (when (eq major-mode 'gnus-article-mode) |
| 3647 | (let ((old-line (count-lines (point-min) (point))) | 3647 | (let ((old-line (count-lines (point-min) (point))) |
| 3648 | (old-column (current-column))) | 3648 | (old-column (- (point) (line-beginning-position)))) |
| 3649 | (goto-char (point-min)) | 3649 | (goto-char (point-min)) |
| 3650 | (while (re-search-forward "^Date:" nil t) | 3650 | (while (re-search-forward "^Date:" nil t) |
| 3651 | (let ((type (get-text-property (match-beginning 0) 'gnus-date-type))) | 3651 | (let ((type (get-text-property (match-beginning 0) 'gnus-date-type))) |
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index f3c75ccd6a3..10e04a87d93 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el | |||
| @@ -1055,8 +1055,11 @@ ones, in case fg and bg are nil." | |||
| 1055 | ;; possibly. | 1055 | ;; possibly. |
| 1056 | (dotimes (i (- height (length lines))) | 1056 | (dotimes (i (- height (length lines))) |
| 1057 | (end-of-line) | 1057 | (end-of-line) |
| 1058 | (insert (make-string (string-width (car lines)) ? ) | 1058 | (let ((start (point))) |
| 1059 | shr-table-vertical-line) | 1059 | (insert (make-string (string-width (car lines)) ? ) |
| 1060 | shr-table-vertical-line) | ||
| 1061 | (when (nth 4 column) | ||
| 1062 | (shr-put-color start (1- (point)) :background (nth 4 column)))) | ||
| 1060 | (forward-line 1))))) | 1063 | (forward-line 1))))) |
| 1061 | (shr-insert-table-ruler widths))) | 1064 | (shr-insert-table-ruler widths))) |
| 1062 | 1065 | ||
| @@ -1173,17 +1176,18 @@ ones, in case fg and bg are nil." | |||
| 1173 | (end-of-line) | 1176 | (end-of-line) |
| 1174 | (when (> (- width (current-column)) 0) | 1177 | (when (> (- width (current-column)) 0) |
| 1175 | (insert (make-string (- width (current-column)) ? ))) | 1178 | (insert (make-string (- width (current-column)) ? ))) |
| 1176 | (forward-line 1)))) | 1179 | (forward-line 1))) |
| 1177 | (when style | 1180 | (when style |
| 1178 | (shr-colorize-region | 1181 | (shr-colorize-region |
| 1179 | (point-min) (point-max) | 1182 | (point-min) (point-max) |
| 1180 | (cdr (assq 'color shr-stylesheet)) | 1183 | (cdr (assq 'color shr-stylesheet)) |
| 1181 | (cdr (assq 'background-color shr-stylesheet)))) | 1184 | (cdr (assq 'background-color shr-stylesheet))))) |
| 1182 | (if fill | 1185 | (if fill |
| 1183 | (list max | 1186 | (list max |
| 1184 | (count-lines (point-min) (point-max)) | 1187 | (count-lines (point-min) (point-max)) |
| 1185 | (split-string (buffer-string) "\n") | 1188 | (split-string (buffer-string) "\n") |
| 1186 | (shr-collect-overlays)) | 1189 | (shr-collect-overlays) |
| 1190 | (cdr (assq 'background-color shr-stylesheet))) | ||
| 1187 | (list max | 1191 | (list max |
| 1188 | (shr-natural-width))))))) | 1192 | (shr-natural-width))))))) |
| 1189 | 1193 | ||