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

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

[nongnu] elpa/bash-completion e515453141 047/313: from an alist to (stri


From: ELPA Syncer
Subject: [nongnu] elpa/bash-completion e515453141 047/313: from an alist to (string start stop)
Date: Sat, 3 Dec 2022 10:59:15 -0500 (EST)

branch: elpa/bash-completion
commit e5154531415d2d92216b781a8156e066f05e5e3b
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>

    from an alist to (string start stop)
---
 bash-completion.el | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/bash-completion.el b/bash-completion.el
index 74ec8792d5..61f37f2301 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -135,17 +135,16 @@ at POS, the current word: ( (word1 word2 ...) . wordnum )"
       (cons cword (nreverse strings)))))
 
 (defsubst bash-completion-split-raw-get-range (current)
-  (cons (cdr (assq 'start current)) (cdr (assq 'end current))))
+  (cdr current))
 
 (defsubst bash-completion-split-raw-set-end (current)
-  (setcdr (assq 'end current) (point)))
+  (setcdr (cdr current) (point)))
 
 (defsubst bash-completion-split-raw-append-str (current str)
-  (let* ((str-cons (assq 'str current)) (straccum (cdr str-cons)))
-    (setcdr str-cons (concat straccum str))))
+  (setcar current (concat (car current) str)))
 
 (defsubst bash-completion-split-raw-get-str (current)
-  (cdr (assq 'str current)))
+  (car current))
 
 (defun bash-completion-split-raw (start end)
   (save-excursion
@@ -155,9 +154,7 @@ at POS, the current word: ( (word1 word2 ...) . wordnum )"
 (defun bash-completion-split-raw-new-element (end accum)
   (skip-chars-forward " \t\n\r" end)
   (if (< (point) end)
-      (bash-completion-split-raw-0 end accum (list (cons 'str "")
-                                                  (cons 'start (point))
-                                                  (cons 'end nil)))
+      (bash-completion-split-raw-0 end accum (list "" (point)))
     accum))
 
 (defun bash-completion-split-raw-0 (end accum current)



reply via email to

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