summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/cl-seq.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-04-21 23:18:15 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-04-21 23:18:15 -0400
commitd6f14ca729315dd94cdb24da47e1569519e3a4dd (patch)
tree61f745135efdeaee056f0b5c0df5039d8a136cef /lisp/emacs-lisp/cl-seq.el
parent44faec17883a77a54378f607adea302f90f2da9d (diff)
downloademacs-d6f14ca729315dd94cdb24da47e1569519e3a4dd.tar.gz
emacs-d6f14ca729315dd94cdb24da47e1569519e3a4dd.tar.bz2
emacs-d6f14ca729315dd94cdb24da47e1569519e3a4dd.zip
* lisp/emacs-lisp/cl-macs.el (cl-struct-slot-offset): Mark as pure.
(cl--set-elt): Don't proclaim as inline. (cl-struct-slot-value): Remove explicit gv-setter and compiler-macro. Define as inlinable instead. (cl-struct-set-slot-value): Remove. * doc/misc/cl.texi (Structures): Remove cl-struct-set-slot-value. * lisp/emacs-lisp/cl-lib.el (cl--set-elt): Remove. * lisp/emacs-lisp/cl-seq.el (cl-replace, cl-substitute, cl-nsubstitute): Use setf instead.
Diffstat (limited to 'lisp/emacs-lisp/cl-seq.el')
-rw-r--r--lisp/emacs-lisp/cl-seq.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el
index aa88264c4ab..a7078328748 100644
--- a/lisp/emacs-lisp/cl-seq.el
+++ b/lisp/emacs-lisp/cl-seq.el
@@ -166,7 +166,7 @@ SEQ1 is destructively modified, then returned.
(cl-n (min (- (or cl-end1 cl-len) cl-start1)
(- (or cl-end2 cl-len) cl-start2))))
(while (>= (setq cl-n (1- cl-n)) 0)
- (cl--set-elt cl-seq1 (+ cl-start1 cl-n)
+ (setf (elt cl-seq1 (+ cl-start1 cl-n))
(elt cl-seq2 (+ cl-start2 cl-n))))))
(if (listp cl-seq1)
(let ((cl-p1 (nthcdr cl-start1 cl-seq1))
@@ -392,7 +392,7 @@ to avoid corrupting the original SEQ.
cl-seq
(setq cl-seq (copy-sequence cl-seq))
(or cl-from-end
- (progn (cl--set-elt cl-seq cl-i cl-new)
+ (progn (setf (elt cl-seq cl-i) cl-new)
(setq cl-i (1+ cl-i) cl-count (1- cl-count))))
(apply 'cl-nsubstitute cl-new cl-old cl-seq :count cl-count
:start cl-i cl-keys))))))
@@ -439,7 +439,7 @@ This is a destructive function; it reuses the storage of SEQ whenever possible.
(setq cl-end (1- cl-end))
(if (cl--check-test cl-old (elt cl-seq cl-end))
(progn
- (cl--set-elt cl-seq cl-end cl-new)
+ (setf (elt cl-seq cl-end) cl-new)
(setq cl-count (1- cl-count)))))
(while (and (< cl-start cl-end) (> cl-count 0))
(if (cl--check-test cl-old (aref cl-seq cl-start))