Function: map-copy

map-copy is a byte-compiled function defined in map.el.gz.

Signature

(map-copy MAP)

Documentation

Return a copy of MAP.

Other relevant functions are documented in the map group.

Probably introduced at or before Emacs version 28.1.

Shortdoc

;; map
(map-copy (list 'bar 1 'foo 2 'baz 3))
    => (bar 1 foo 2 baz 3)
  (map-copy (list '(bar . 1) '(foo . 2) '(baz . 3)))
    => ((bar . 1) (foo . 2) (baz . 3))
  (map-copy [bar foo baz])
    => [bar foo baz]
  (map-copy #s(hash-table data (bar 1 foo 2 baz 3)))
    => #s(hash-table data (bar 1 foo 2 baz 3))

Implementations

(map-copy (MAP array)) in `map.el'.

Undocumented

(map-copy (MAP hash-table)) in `map.el'.

Undocumented

(map-copy (MAP list)) in `map.el'.

Use `copy-alist' on alists and `copy-sequence' on plists.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/map.el.gz
(cl-defgeneric map-copy (map)
  "Return a copy of MAP.")