summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMattias Engdegård <mattiase@acm.org>2022-09-03 16:35:16 +0200
committerMattias Engdegård <mattiase@acm.org>2022-09-03 17:59:42 +0200
commit99a5a72537be811ae4220d9b58329991d6aa3d4d (patch)
treecef7ce922f30ae4a418ed9538cc277e5df268f0b /lisp
parent1cea0ae4133bb22fd70d483df105e5a4653bc56c (diff)
downloademacs-99a5a72537be811ae4220d9b58329991d6aa3d4d.tar.gz
lisp/emacs-lisp/seq.el: remove unnecessary compatibility code
* lisp/emacs-lisp/seq.el (seq-take, seq--activate-font-lock-keywords): Simplify unnecessarily guarded code, as this file will only ever be used with the same version of Emacs.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/seq.el18
1 files changed, 1 insertions, 17 deletions
diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el
index b6f0f66e5b1..1b4a49e4e32 100644
--- a/lisp/emacs-lisp/seq.el
+++ b/lisp/emacs-lisp/seq.el
@@ -618,13 +618,7 @@ Signal an error if SEQUENCE is empty."
(cl-defmethod seq-take ((list list) n)
"Optimized implementation of `seq-take' for lists."
- (if (eval-when-compile (fboundp 'take))
- (take n list)
- (let ((result '()))
- (while (and list (> n 0))
- (setq n (1- n))
- (push (pop list) result))
- (nreverse result))))
+ (take n list))
(cl-defmethod seq-drop-while (pred (list list))
"Optimized implementation of `seq-drop-while' for lists."
@@ -655,16 +649,6 @@ Signal an error if SEQUENCE is empty."
sequence
(concat sequence)))
-(defun seq--activate-font-lock-keywords ()
- "Activate font-lock keywords for some symbols defined in seq."
- (font-lock-add-keywords 'emacs-lisp-mode
- '("\\<seq-doseq\\>" "\\<seq-let\\>")))
-
-(unless (fboundp 'elisp--font-lock-flush-elisp-buffers)
- ;; In Emacs≥25, (via elisp--font-lock-flush-elisp-buffers and a few others)
- ;; we automatically highlight macros.
- (add-hook 'emacs-lisp-mode-hook #'seq--activate-font-lock-keywords))
-
(defun seq-split (sequence length)
"Split SEQUENCE into a list of sub-sequences of at most LENGTH.
All the sub-sequences will be of LENGTH, except the last one,