diff options
| author | Katsumi Yamaoka | 2010-11-02 02:19:52 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2010-11-02 02:19:52 +0000 |
| commit | f939acf1431a873262b5bc14d4f9c4c84704a37e (patch) | |
| tree | 2227060c2dcabdb6cb96d404b5f394ca03990ab7 | |
| parent | 0f75c62ae368984e9379a13233dd9c443ea57bdd (diff) | |
| download | emacs-f939acf1431a873262b5bc14d4f9c4c84704a37e.tar.gz emacs-f939acf1431a873262b5bc14d4f9c4c84704a37e.zip | |
gnus-cite.el (gnus-article-fill-cited-article): Make fill work properly for XEmacs as well.
gnus-cite.el (gnus-article-fill-cited-article, gnus-article-foldable-buffer, gnus-article-natural-long-line-p): Use window-width rather than frame-width.
| -rw-r--r-- | lisp/gnus/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/gnus/gnus-cite.el | 15 |
2 files changed, 17 insertions, 6 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7dab1382564..a5c99c38129 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2010-11-02 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus-cite.el (gnus-article-fill-cited-article): Make fill work | ||
| 4 | properly for XEmacs as well. | ||
| 5 | (gnus-article-fill-cited-article, gnus-article-foldable-buffer) | ||
| 6 | (gnus-article-natural-long-line-p): Use window-width rather than | ||
| 7 | frame-width. | ||
| 8 | |||
| 1 | 2010-11-01 Andrew Cohen <cohen@andy.bu.edu> | 9 | 2010-11-01 Andrew Cohen <cohen@andy.bu.edu> |
| 2 | 10 | ||
| 3 | * nnir.el (nnir-run-gmane): inhibit demon. return nil if no messages. | 11 | * nnir.el (nnir-run-gmane): inhibit demon. return nil if no messages. |
diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el index c99cb5cf2e3..69d64366de1 100644 --- a/lisp/gnus/gnus-cite.el +++ b/lisp/gnus/gnus-cite.el | |||
| @@ -544,17 +544,20 @@ longer than the frame width." | |||
| 544 | use-hard-newlines) | 544 | use-hard-newlines) |
| 545 | (unless do-fill | 545 | (unless do-fill |
| 546 | (setq do-fill (gnus-article-foldable-buffer (cdar marks)))) | 546 | (setq do-fill (gnus-article-foldable-buffer (cdar marks)))) |
| 547 | ;; Note: the XEmacs version of `fill-region' inserts a newline | ||
| 548 | ;; unless the region ends with a newline. | ||
| 547 | (when do-fill | 549 | (when do-fill |
| 548 | (if (not long-lines) | 550 | (if (not long-lines) |
| 549 | (fill-region (point-min) (point-max)) | 551 | (fill-region (point-min) (point-max)) |
| 550 | (goto-char (point-min)) | 552 | (goto-char (point-min)) |
| 551 | (while (not (eobp)) | 553 | (while (not (eobp)) |
| 552 | (end-of-line) | 554 | (end-of-line) |
| 553 | (when (> (current-column) (frame-width)) | 555 | (when (prog1 |
| 556 | (> (current-column) (window-width)) | ||
| 557 | (forward-line 1)) | ||
| 554 | (save-restriction | 558 | (save-restriction |
| 555 | (narrow-to-region (line-beginning-position) (point)) | 559 | (narrow-to-region (line-beginning-position 0) (point)) |
| 556 | (fill-region (point-min) (point-max)))) | 560 | (fill-region (point-min) (point-max)))))))) |
| 557 | (forward-line 1))))) | ||
| 558 | (set-marker (caar marks) nil) | 561 | (set-marker (caar marks) nil) |
| 559 | (setq marks (cdr marks))) | 562 | (setq marks (cdr marks))) |
| 560 | (when marks | 563 | (when marks |
| @@ -581,7 +584,7 @@ longer than the frame width." | |||
| 581 | (push elem columns)) | 584 | (push elem columns)) |
| 582 | (setcdr elem (1+ (cdr elem))))) | 585 | (setcdr elem (1+ (cdr elem))))) |
| 583 | (end-of-line) | 586 | (end-of-line) |
| 584 | (when (> (current-column) (frame-width)) | 587 | (when (> (current-column) (window-width)) |
| 585 | (setq do-fill t)) | 588 | (setq do-fill t)) |
| 586 | (forward-line 1)) | 589 | (forward-line 1)) |
| 587 | (and do-fill | 590 | (and do-fill |
| @@ -596,7 +599,7 @@ longer than the frame width." | |||
| 596 | (and | 599 | (and |
| 597 | ;; The line is long. | 600 | ;; The line is long. |
| 598 | (> (- (line-end-position) (line-beginning-position)) | 601 | (> (- (line-end-position) (line-beginning-position)) |
| 599 | (frame-width)) | 602 | (window-width)) |
| 600 | ;; It doesn't start with spaces. | 603 | ;; It doesn't start with spaces. |
| 601 | (not (looking-at " ")) | 604 | (not (looking-at " ")) |
| 602 | ;; Not cited text. | 605 | ;; Not cited text. |