[lice @ more rearranging. define-key modifications to accomodate bindings.lisp. this...
[lice.git] / src / data.lisp
blob3825e665044537d8752bf277072b117fedd992f2
1 ;;; data.lisp --- compatibility functions from emacs
3 (in-package "LICE")
5 (defun % (number divisor)
6 "same as mod."
7 (mod number divisor))
9 (defun setcar (cell newcar)
10 "Set the car of cell to be newcar. Returns newcar."
11 (setf (car cell) newcar))
13 (depricate aset (setf aref))
14 (defun aset (array idx newelt)
15 "Store into the element of ARRAY at index IDX the value NEWELT.
16 Return NEWELT. ARRAY may be a vector, a string, a char-table or a
17 bool-vector. IDX starts at 0."
18 (setf (aref array idx) newelt))
20 (defmacro defalias (to from &optional docstring)
21 "Set SYMBOL's function definition to DEFINITION, and return DEFINITION.
22 Associates the function with the current load file, if any.
23 The optional third argument DOCSTRING specifies the documentation string
24 for SYMBOL; if it is omitted or nil, SYMBOL uses the documentation string
25 determined by DEFINITION."
26 ;; FIXME: implement
27 (declare (ignore to from docstring)))
29 (defun plist-get (plist prop)
30 "Extract a value from a property list.
31 PLIST is a property list, which is a list of the form
32 \(PROP1 VALUE1 PROP2 VALUE2...). This function returns the value
33 corresponding to the given PROP, or nil if PROP is not
34 one of the properties on the list."
35 (getf plist prop))
37 (defun sequencep (object)
38 "Return t if OBJECT is a sequence (list or array)."
39 (typep object 'sequence))
41 (defun copy-sequence (seq)
42 "Return a copy of a list, vector, string or char-table.
43 The elements of a list or vector are not copied; they are shared
44 with the original."
45 (copy-seq seq))