[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 119a7dd2208 1/2: ebnf2ps: eliminate double nreverse
From: |
Mattias Engdegård |
Subject: |
master 119a7dd2208 1/2: ebnf2ps: eliminate double nreverse |
Date: |
Mon, 10 Apr 2023 09:22:43 -0400 (EDT) |
branch: master
commit 119a7dd22084fe20da7b2fddd41a63870da89bda
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
ebnf2ps: eliminate double nreverse
* lisp/progmodes/ebnf-otz.el (ebnf-split-suffix): Simplify code that
relied on a rather inobvious in-place reversal of a list twice for
correctness, silencing a byte-compiler warning.
---
lisp/progmodes/ebnf-otz.el | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lisp/progmodes/ebnf-otz.el b/lisp/progmodes/ebnf-otz.el
index 9ac37b676f9..4155dc0d2cd 100644
--- a/lisp/progmodes/ebnf-otz.el
+++ b/lisp/progmodes/ebnf-otz.el
@@ -566,7 +566,7 @@
;; determine suffix length
(while (and (> isuf 0) (setq tail (cdr tail)))
(let* ((cur head)
- (tlis (nreverse
+ (tlis (reverse
(if (eq (ebnf-node-kind (car tail)) 'ebnf-generate-sequence)
(ebnf-node-list (car tail))
(list (car tail)))))
@@ -577,7 +577,6 @@
(setq cur (cdr cur)
this (cdr this)
i (1+ i)))
- (nreverse tlis)
(setq isuf (min isuf i))))
(setq head (nreverse head))
(if (or (zerop isuf) (> isuf len))