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

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

[nongnu] elpa/macrostep afed3cf 072/110: MARKER-CHAR-POSITION => MARKER-


From: ELPA Syncer
Subject: [nongnu] elpa/macrostep afed3cf 072/110: MARKER-CHAR-POSITION => MARKER-CHAR-ID
Date: Sat, 7 Aug 2021 09:18:05 -0400 (EDT)

branch: elpa/macrostep
commit afed3cfda8459e817706943201f93fe69da755a2
Author: Luís Oliveira <loliveira@common-lisp.net>
Commit: Luís Oliveira <loliveira@common-lisp.net>

    MARKER-CHAR-POSITION => MARKER-CHAR-ID
    
    (And improve the assertion in MAKE-MARKER-CHAR.)
---
 swank-macrostep.lisp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/swank-macrostep.lisp b/swank-macrostep.lisp
index 8cc7493..84daa1a 100644
--- a/swank-macrostep.lisp
+++ b/swank-macrostep.lisp
@@ -138,13 +138,13 @@
 (defun marker-char-p (char)
   (<= #xe000 (char-code char) #xe8ff))
 
-(defun make-marker-char (position)
+(defun make-marker-char (id)
   ;; using the private-use characters U+E000..U+F8FF as markers, so
   ;; that's our upper limit for how many we can use.
-  (assert (<= position #x8ff))
-  (code-char (+ #xe000 position)))
+  (assert (<= 0 id #x8ff))
+  (code-char (+ #xe000 id)))
 
-(defun marker-char-position (char)
+(defun marker-char-id (char)
   (assert (marker-char-p char))
   (- (char-code char) #xe000))
 
@@ -178,7 +178,7 @@
           for char across string
           unless (whitespacep char)
             do (if (marker-char-p char)
-                   (push p (aref positions (marker-char-position char)))
+                   (push p (aref positions (marker-char-id char)))
                    (incf p)))
     (map 'list #'reverse positions)))
 



reply via email to

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