diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2018-07-24 15:58:46 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2018-07-24 16:08:09 -0700 |
commit | 200195e824befa112459c0afbac7c94aea739573 (patch) | |
tree | 7799fc7738ba0b7cbfa2539c4c15c713c2419cd9 /lisp/subr.el | |
parent | 0ed21b7b3e71303d7858192246012f4b26438ad8 (diff) | |
download | emacs-200195e824befa112459c0afbac7c94aea739573.tar.gz |
Move proper-list-p to C
Since C code can use it and it’s simple, we might as well use C.
* lisp/subr.el (proper-list-p): Move to C code.
* src/eval.c (signal_error): Simplify by using Fproper_list_p.
* src/fns.c (Fproper_list_p): New function, moved here from Lisp.
Simplify signal_error
* src/eval.c (signal_error): Simplify by using FOR_EACH_TAIL_SAFE.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r-- | lisp/subr.el | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 10343e69db8..6b30371a868 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -555,12 +555,6 @@ If N is omitted or nil, remove the last element." (if (> n 0) (setcdr (nthcdr (- (1- m) n) list) nil)) list)))) -(defun proper-list-p (object) - "Return OBJECT's length if it is a proper list, nil otherwise. -A proper list is neither circular nor dotted (i.e., its last cdr -is nil)." - (and (listp object) (ignore-errors (length object)))) - (defun delete-dups (list) "Destructively remove `equal' duplicates from LIST. Store the result in LIST and return it. LIST must be a proper list. |