diff options
author | Basil L. Contovounesios <contovob@tcd.ie> | 2019-04-09 16:51:55 +0100 |
---|---|---|
committer | Basil L. Contovounesios <contovob@tcd.ie> | 2019-04-12 14:25:36 +0100 |
commit | 9a54e70c184cd9f65f1141a1b1df87e9afb83d2f (patch) | |
tree | 1ec102a85466c318cc12a7f6ebdb4d24d6cd00b7 /lisp/subr.el | |
parent | 6dc4c722af4e5f9f189631638700cd1fb3cc2edb (diff) | |
download | emacs-9a54e70c184cd9f65f1141a1b1df87e9afb83d2f.tar.gz emacs-9a54e70c184cd9f65f1141a1b1df87e9afb83d2f.tar.bz2 emacs-9a54e70c184cd9f65f1141a1b1df87e9afb83d2f.zip |
Optimize byte-compilation of proper-list-p
For discussion, see thread starting at:
https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00316.html
* lisp/emacs-lisp/byte-opt.el: Optimize proper-list-p as a
predicate.
* lisp/subr.el: Mark proper-list-p as pure, and side-effect and
error free.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r-- | lisp/subr.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index bdf98979c49..bf3716bbd37 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -604,6 +604,11 @@ If N is omitted or nil, remove the last element." (if (> n 0) (setcdr (nthcdr (- (1- m) n) list) nil)) list)))) +;; The function's definition was moved to fns.c, +;; but it's easier to set properties here. +(put 'proper-list-p 'pure t) +(put 'proper-list-p 'side-effect-free 'error-free) + (defun delete-dups (list) "Destructively remove `equal' duplicates from LIST. Store the result in LIST and return it. LIST must be a proper list. |