emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 9684687793: Rename 'longlines-breakpoint-chars' to 'longlines-bre


From: Lars Ingebrigtsen
Subject: master 9684687793: Rename 'longlines-breakpoint-chars' to 'longlines-break-chars'
Date: Mon, 11 Jul 2022 04:23:43 -0400 (EDT)

branch: master
commit 96846877930f580e122e9af85b4653918c542f89
Author: Manuel Giraud <manuel@ledu-giraud.fr>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

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

diff --git a/etc/NEWS b/etc/NEWS
index 660ea7d720..526bda283c 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..4ad2cab2b2 100644
--- a/lisp/longlines.el
+++ b/lisp/longlines.el
@@ -72,8 +72,9 @@ You can also enable the display temporarily, using the command
 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."
+  :version "29.1"
   :type 'string)
 
 ;;; Internal variables
@@ -303,8 +304,8 @@ not need to be wrapped, move point to the next line and 
return t."
 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 +315,17 @@ line."
 (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 +333,10 @@ If no breakpoint is found, return nil."
 (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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]