From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Manuel Giraud <manuel@ledu-giraud.fr>
Newsgroups: gmane.emacs.bugs
Subject: bug#56335: 29.0.50;
 [PATCH] Add more breakpoint chars support to longlines-mode
Date: Sun, 10 Jul 2022 10:58:18 +0200
Message-ID: <87mtdhuyxh.fsf@elite.giraud>
References: <87czep15pf.fsf@elite.giraud> <87y1xb1zk5.fsf@gnus.org>
 <83sfnjbse9.fsf@gnu.org> <87edz31y62.fsf@gnus.org>
 <83pminbrak.fsf@gnu.org> <87fsjjzfpl.fsf@gnus.org>
 <87k08vrz4b.fsf@elite.giraud> <831qv2bwx3.fsf@gnu.org>
 <87iloduwt0.fsf@elite.giraud> <834jzx9ld5.fsf@gnu.org>
 <87wncrzp19.fsf@elite.giraud> <875ykb34gr.fsf@gnus.org>
 <877d4qbl2m.fsf@elite.giraud> <86h73uqdp5.fsf@mail.linkov.net>
 <87y1x6c6io.fsf@elite.giraud> <E1o9ejL-0000cH-VB@fencepost.gnu.org>
 <87let45b5g.fsf@elite.giraud> <83h73s3w82.fsf@gnu.org>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="6038"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (berkeley-unix)
Cc: larsi@gnus.org, 56335@debbugs.gnu.org, rms@gnu.org, juri@linkov.net
To: Eli Zaretskii <eliz@gnu.org>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 10 10:59:15 2022
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1oASmZ-0001IT-7w
	for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Jul 2022 10:59:15 +0200
Original-Received: from localhost ([::1]:59128 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1oASmY-00061j-5g
	for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Jul 2022 04:59:14 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39452)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1oASmM-0005zZ-Qa
 for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2022 04:59:02 -0400
Original-Received: from debbugs.gnu.org ([209.51.188.43]:42351)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1oASmM-00030S-Hb
 for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2022 04:59:02 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1oASmM-00031N-DW
 for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2022 04:59:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Manuel Giraud <manuel@ledu-giraud.fr>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sun, 10 Jul 2022 08:59:02 +0000
Resent-Message-ID: <handler.56335.B56335.165744350711568@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 56335
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
Original-Received: via spool by 56335-submit@debbugs.gnu.org id=B56335.165744350711568
 (code B ref 56335); Sun, 10 Jul 2022 08:59:02 +0000
Original-Received: (at 56335) by debbugs.gnu.org; 10 Jul 2022 08:58:27 +0000
Original-Received: from localhost ([127.0.0.1]:36248 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1oASln-00030W-0P
 for submit@debbugs.gnu.org; Sun, 10 Jul 2022 04:58:27 -0400
Original-Received: from ledu-giraud.fr ([51.159.28.247]:38700)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <manuel@ledu-giraud.fr>) id 1oASlk-00030M-LY
 for 56335@debbugs.gnu.org; Sun, 10 Jul 2022 04:58:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=iwF6M7VSN58TJ+Nz
 Jbb056XXGdf2mDyf0D/UiZcjdxU=;
 h=date:references:in-reply-to:subject:
 cc:to:from; d=ledu-giraud.fr; b=bbvLFcKwlKGHQWDD9iFJzsaCSGplHoY1LWicZb
 4aFZs2OA/k4eEyWSh6IOyghkybGahHrjkYWGq5sA9QnP6J6YuI48Jb82xK/ijHsQ613rtQ
 DISuD/j6ido5ZMqUifd7shgbb7f2cQcyVpCzuW4ixK1zX+iLyizNghrwHBHdNlzrMSl7NE
 kEjfQ5X8TJXkuZQIj/Oi2RJRsM86ak0RHdDyERtXj0on82gnx0hcWjYvUjxVZtxAi50PDX
 MT9srsfC7R2MZw9WEtwAe8BLXGBRXG05oXOnhc2mgQrMDnocjwX2It4Fp8uyANjEbzaoxd
 /Iv3xqMHc0xw9S75KrQF2R0A==
Original-Received: from elite.giraud (<unknown> [10.1.1.1])
 by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 8e645627
 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); 
 Sun, 10 Jul 2022 10:58:22 +0200 (CEST)
In-Reply-To: <83h73s3w82.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 08 Jul
 2022 10:22:05 +0300")
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: "bug-gnu-emacs"
 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Xref: news.gmane.io gmane.emacs.bugs:236547
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/236547>

--=-=-=
Content-Type: text/plain

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Manuel Giraud <manuel@ledu-giraud.fr>
>> Cc: juri@linkov.net,  larsi@gnus.org,  56335@debbugs.gnu.org,  eliz@gnu.org
>> Date: Fri, 08 Jul 2022 09:14:19 +0200
>> 
>> "breakpoint" was already used into longlines' code...  But now we have a
>> user option that contains "breakpoint".  I propose to change this option
>> from 'longlines-breakpoint-chars' to 'longlines-separators'.  What do
>> you think?
>
> I suggest 'longlines-break-chars'.

Fine by me. Here is a renaming patch.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-Rename-longlines-breakpoint-chars-to-longlines-break.patch

>From 5f36624001f0daf8fa27d8c3fa4e7bb1ae2c3deb Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Sun, 10 Jul 2022 10:54:12 +0200
Subject: [PATCH] Rename 'longlines-breakpoint-chars' to
 'longlines-break-chars'

* etc/NEWS:
* lisp/longlines.el (longlines-break-chars): Rename
'longlines-breakpoint-chars' to 'longlines-break-chars'.
---
 etc/NEWS          |  4 ++--
 lisp/longlines.el | 20 ++++++++++----------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 02fe67129d..abdd1f0566 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -463,8 +463,8 @@ previous behavior).  The default is nil, which inhibits recording of
 passwords.
 
 +++
-** New user option 'longlines-breakpoint-chars'.
-This is a string containing chars that could be used as breakpoint in
+** New user option 'longlines-break-chars'.
+This is a string containing chars that could be used as break point in
 longlines mode.
 
 +++
diff --git a/lisp/longlines.el b/lisp/longlines.el
index 6dc2f61ed9..652e3ff14f 100644
--- a/lisp/longlines.el
+++ b/lisp/longlines.el
@@ -72,7 +72,7 @@ longlines-show-effect
 This is used when `longlines-show-hard-newlines' is on."
   :type 'string)
 
-(defcustom longlines-breakpoint-chars " ;,|"
+(defcustom longlines-break-chars " ;,|"
   "A bag of separator chars for longlines."
   :type 'string)
 
@@ -303,8 +303,8 @@ longlines-set-breakpoint
 If the line should not be broken, return nil; point remains on the
 line."
   (move-to-column target-column)
-  (let ((non-breakpoint-re (format "[^%s]" longlines-breakpoint-chars)))
-    (if (and (re-search-forward non-breakpoint-re (line-end-position) t 1)
+  (let ((non-break-re (format "[^%s]" longlines-break-chars)))
+    (if (and (re-search-forward non-break-re (line-end-position) t 1)
              (> (current-column) target-column))
         ;; This line is too long.  Can we break it?
         (or (longlines-find-break-backward)
@@ -314,17 +314,17 @@ longlines-set-breakpoint
 (defun longlines-find-break-backward ()
   "Move point backward to the first available breakpoint and return t.
 If no breakpoint is found, return nil."
-  (let ((breakpoint-re (format "[%s]" longlines-breakpoint-chars)))
-    (when (and (re-search-backward breakpoint-re (line-beginning-position) t 1)
+  (let ((break-re (format "[%s]" longlines-break-chars)))
+    (when (and (re-search-backward break-re (line-beginning-position) t 1)
                (save-excursion
-                 (skip-chars-backward longlines-breakpoint-chars
+                 (skip-chars-backward longlines-break-chars
                                       (line-beginning-position))
                  (null (bolp))))
       (forward-char 1)
       (if (and fill-nobreak-predicate
                (run-hook-with-args-until-success 'fill-nobreak-predicate))
           (progn
-            (skip-chars-backward longlines-breakpoint-chars
+            (skip-chars-backward longlines-break-chars
                                  (line-beginning-position))
             (longlines-find-break-backward))
         t))))
@@ -332,10 +332,10 @@ longlines-find-break-backward
 (defun longlines-find-break-forward ()
   "Move point forward to the first available breakpoint and return t.
 If no break point is found, return nil."
-  (let ((breakpoint-re (format "[%s]" longlines-breakpoint-chars)))
-    (and (re-search-forward breakpoint-re (line-end-position) t 1)
+  (let ((break-re (format "[%s]" longlines-break-chars)))
+    (and (re-search-forward break-re (line-end-position) t 1)
          (progn
-           (skip-chars-forward longlines-breakpoint-chars (line-end-position))
+           (skip-chars-forward longlines-break-chars (line-end-position))
            (null (eolp)))
          (if (and fill-nobreak-predicate
                   (run-hook-with-args-until-success 'fill-nobreak-predicate))
-- 
2.36.1


--=-=-=
Content-Type: text/plain

-- 
Manuel Giraud

--=-=-=--