[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 00a9712: Allow adjusting the `W Q' Gnus summary command interacti
From: |
Lars Ingebrigtsen |
Subject: |
master 00a9712: Allow adjusting the `W Q' Gnus summary command interactively |
Date: |
Sun, 19 Jul 2020 09:18:38 -0400 (EDT) |
branch: master
commit 00a97124203258fcbd08bdc9b719f15ab777f887
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Allow adjusting the `W Q' Gnus summary command interactively
* doc/misc/gnus.texi (Article Washing): Document it.
* lisp/gnus/gnus-art.el (article-fill-long-lines): Take a numeric
prefix as the fill width (bug#38698).
---
doc/misc/gnus.texi | 3 +++
etc/NEWS | 4 ++++
lisp/gnus/gnus-art.el | 20 +++++++++++++-------
3 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 294d959..2f4bc0c 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -9060,6 +9060,9 @@ when filling.
@findex gnus-article-fill-long-lines
Fill long lines (@code{gnus-article-fill-long-lines}).
+You can give the command a numerical prefix to specify the width to use
+when filling.
+
@item W C
@kindex W C @r{(Summary)}
@findex gnus-article-capitalize-sentences
diff --git a/etc/NEWS b/etc/NEWS
index 7fbe630..7c6c9fe 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -213,6 +213,10 @@ The names of the commands 'gnus-slave',
'gnus-slave-no-server' and
'gnus-slave-unplugged' have changed to 'gnus-child',
'gnus-child-no-server' and 'gnus-child-unplugged' respectively.
++++
+*** The 'W Q' summary mode command now takes a numerical prefix to
+allow adjusting the fill width.
+
---
*** Change to default value of 'message-draft-headers' user option.
The 'Date' symbol has been removed from the default value, meaning that
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 0c0c1bd..3cba4ec 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -2303,21 +2303,27 @@ long lines if and only if arg is positive."
"\n")
(put-text-property start (point) 'gnus-decoration 'header)))))
-(defun article-fill-long-lines ()
- "Fill lines that are wider than the window width or `fill-column'."
- (interactive)
+(defun article-fill-long-lines (&optional width)
+ "Fill lines that are wider than the window width or `fill-column'.
+If WIDTH (interactively, the numeric prefix), use that as the
+fill width."
+ (interactive "P")
(save-excursion
- (let ((inhibit-read-only t)
- (width (window-width (get-buffer-window (current-buffer)))))
+ (let* ((inhibit-read-only t)
+ (window-width (window-width (get-buffer-window (current-buffer))))
+ (width (if width
+ (prefix-numeric-value width)
+ (min fill-column window-width))))
(save-restriction
(article-goto-body)
(let ((adaptive-fill-mode nil)) ;Why? -sm
(while (not (eobp))
(end-of-line)
- (when (>= (current-column) (min fill-column width))
+ (when (>= (current-column) width)
(narrow-to-region (min (1+ (point)) (point-max))
(point-at-bol))
- (let ((goback (point-marker)))
+ (let ((goback (point-marker))
+ (fill-column width))
(fill-paragraph nil)
(goto-char (marker-position goback)))
(widen))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 00a9712: Allow adjusting the `W Q' Gnus summary command interactively,
Lars Ingebrigtsen <=