Skip to main content
added 436 characters in body
Source Link
Drew
  • 80.9k
  • 10
  • 125
  • 265

Function copy-list is defined in library cl.el in older Emacs releases. You'd need to load that library before trying to call the function.

But in recent releases you need to load library cl-lib.el instead, and the function is now called cl-copy-list.

You don't say what release you're using. A guess is that you're using a recent release, where copy-list is no longer even an alias for cl-copy-list. In any case, unless you have a very old release you need to load cl-lib.el: (require 'cl-lib).

To find the package where it's defined, try C-h f copy-list TAB TAB, then choose cl-copy-list. In buffer *Help* you then see this, which tells you that function is in library cl-lib.el:

cl-copy-list is a byte-compiled Lisp function in cl-lib.el.

(cl-copy-list LIST)

Return a copy of LIST, which may be a dotted list.

The elements of LIST are not copied, just the list structure itself.

Function copy-list is defined in library cl.el in older Emacs releases. You'd need to load that library before trying to call the function.

But in recent releases you need to load library cl-lib.el instead, and the function is now called cl-copy-list.

You don't say what release you're using. A guess is that you're using a recent release, where copy-list is no longer even an alias for cl-copy-list. In any case, unless you have a very old release you need to load cl-lib.el: (require 'cl-lib).

Function copy-list is defined in library cl.el in older Emacs releases. You'd need to load that library before trying to call the function.

But in recent releases you need to load library cl-lib.el instead, and the function is now called cl-copy-list.

You don't say what release you're using. A guess is that you're using a recent release, where copy-list is no longer even an alias for cl-copy-list. In any case, unless you have a very old release you need to load cl-lib.el: (require 'cl-lib).

To find the package where it's defined, try C-h f copy-list TAB TAB, then choose cl-copy-list. In buffer *Help* you then see this, which tells you that function is in library cl-lib.el:

cl-copy-list is a byte-compiled Lisp function in cl-lib.el.

(cl-copy-list LIST)

Return a copy of LIST, which may be a dotted list.

The elements of LIST are not copied, just the list structure itself.

Source Link
Drew
  • 80.9k
  • 10
  • 125
  • 265

Function copy-list is defined in library cl.el in older Emacs releases. You'd need to load that library before trying to call the function.

But in recent releases you need to load library cl-lib.el instead, and the function is now called cl-copy-list.

You don't say what release you're using. A guess is that you're using a recent release, where copy-list is no longer even an alias for cl-copy-list. In any case, unless you have a very old release you need to load cl-lib.el: (require 'cl-lib).