emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/hyperbole ea6d4530fa: Finish removal of 'pos' as an arg


From: ELPA Syncer
Subject: [elpa] externals/hyperbole ea6d4530fa: Finish removal of 'pos' as an arg to kproperty:replace-separator
Date: Mon, 17 Oct 2022 16:57:46 -0400 (EDT)

branch: externals/hyperbole
commit ea6d4530faefcd7bd0ac43f8ac60622c1f1e0db8
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>

    Finish removal of 'pos' as an arg to kproperty:replace-separator
---
 ChangeLog         |  5 +++++
 kotl/kproperty.el | 11 ++++++-----
 kotl/kview.el     |  2 +-
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bce6227b83..0291e24e48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,11 @@
 * hmouse-sh.el (hmouse-get-bindings, hmouse-shifted-setup): Don't use
     global name for parameter.
 
+2022-10-16  Bob Weiner  <rsw@gnu.org>
+
+* kotl/kproperty.el (kproperty:replace-separator): Drop unused 'pos' arg.
+  kotl/kview.el (kview:set-label-separator): Update call to above function.
+
 2022-10-15  Bob Weiner  <rsw@gnu.org>
 
 * hui-em-but.el (hproperty:but-flash): Remove 'a' and 'b' internal
diff --git a/kotl/kproperty.el b/kotl/kproperty.el
index 75db9fac5b..2f4d491baf 100644
--- a/kotl/kproperty.el
+++ b/kotl/kproperty.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:    7/27/93
-;; Last-Mod:      3-Apr-22 at 18:33:09 by Bob Weiner
+;; Last-Mod:     16-Oct-22 at 10:01:41 by Bob Weiner
 ;;
 ;; Copyright (C) 1993-2021  Free Software Foundation, Inc.
 ;; See the "../HY-COPY" file for license information.
@@ -100,15 +100,16 @@ Return t if any property was changed, nil otherwise."
        (setq changed t next (1+ next))))
     changed))
 
-(defun kproperty:replace-separator (pos label-separator old-sep-len)
-  "Replace at POS the cell label separator with LABEL-SEPARATOR.
+(defun kproperty:replace-separator (new-label-separator old-sep-len)
+  "Replace from point forward each cell's label separator with 
NEW-LABEL-SEPARATOR.
 OLD-SEP-LEN is the length of the separator being replaced."
-  (let (properties)
+  (let (pos
+       properties)
     (while (setq pos (kproperty:next-single-change (point) 'kcell))
       (goto-char pos)
       (setq properties (text-properties-at pos))
       ;; Replace label-separator while maintaining cell properties.
-      (insert label-separator)
+      (insert new-label-separator)
       (add-text-properties pos (+ pos 2) properties)
       (delete-region (point) (+ (point) old-sep-len)))))
 
diff --git a/kotl/kview.el b/kotl/kview.el
index e871eb7392..f22e5c780b 100644
--- a/kotl/kview.el
+++ b/kotl/kview.el
@@ -1418,7 +1418,7 @@ new outlines is also set to this new value."
                      (+ (match-beginning 0) 2) (match-end 0))))))))
     (save-excursion
       (goto-char (point-min))
-      (kproperty:replace-separator pos label-separator old-sep-len)
+      (kproperty:replace-separator label-separator old-sep-len)
       ;; Reindent all lines in cells except the first line which has already
       ;; been done.
       (funcall reindent-function))



reply via email to

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