diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2024-02-14 17:32:45 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2024-03-02 12:14:57 +0100 |
| commit | 40775ea8dc96d7e930626b7daf9f9cb199b77528 (patch) | |
| tree | c9e0af67ad0abced597eda1fb646da63c59dc91c /.gnus | |
| parent | 65eca3fddc0352d2c59f1051c871baeda49c95aa (diff) | |
| download | dotfiles-40775ea8dc96d7e930626b7daf9f9cb199b77528.tar.xz | |
Fixup wrap heuristic
gnus-article-prepare-hook is _not_ run in the article buffer. No idea
why things fall into place on my desktop; probably some ill-defined
buffer-switching plumbing.
Also clarify nearby comment.
Diffstat (limited to '.gnus')
| -rw-r--r-- | .gnus | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -171,9 +171,9 @@ (> (length current-line) fill-column) ;; The line is not boring (citation, diff addition/removal). (not (string-match-p "\\`[>+-]" current-line)) - ;; Lines that start with spaces are boring, unless this - ;; is an HTML part: those are choked with <table> tags - ;; that shr left-pads with spaces. + ;; Lines that start with spaces are boring, except in + ;; HTML parts: those are choked with <table> tags that + ;; shr left-pads with spaces. ;; NB: HAS-HTML is a naive heuristic: we are assuming ;; that "any text/html part is present" means "we are ;; looking at this text/html part". @@ -184,8 +184,9 @@ (defun my/gnus-article-wrap-maybe () ;; Enable visual-line-mode when it helps, i.e. when the message has ;; long lines that are not part of citations nor patches. - (visual-line-mode - (unless (my/gnus-article-should-wrap) -1))) + (with-current-buffer gnus-article-buffer + (visual-line-mode + (unless (my/gnus-article-should-wrap) -1)))) ;; Article setup is tricky. In order, `gnus-article-prepare' ;; |
