Emacs Notes

Table of Contents

1 Emacs notes

nil

1.1 Flatten lists in emacs lisp using ,@

Taken from the emacs lisp info.

You can also "splice" an evaluated value into the resulting list,
using the special marker `,@'. The elements of the spliced list become
elements at the same level as the other elements of the resulting list.
The equivalent code without using ``' is often unreadable. Here are
some examples:

(setq some-list '(2 3))
=> (2 3)
(cons 1 (append some-list '(4) some-list))
=> (1 2 3 4 2 3)
`(1 ,@some-list 4 ,@some-list)
=> (1 2 3 4 2 3)

Author: konubinix

Created: 2015-11-01 dim. 19:07

Emacs 24.3.50.1 (Org mode 8.0.3)

Validate