[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Add-to-list or setq append...
From: |
Andrea Crotti |
Subject: |
Add-to-list or setq append... |
Date: |
Wed, 04 Aug 2010 00:37:03 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (darwin) |
Just a curiosity, I was wondering why in so many README and doc they
suggest to add elements to lists with something like:
--8<---------------cut here---------------start------------->8---
(setq list (append list element))
--8<---------------cut here---------------end--------------->8---
instead of doing simply
--8<---------------cut here---------------start------------->8---
(add-to-list list-va element)
--8<---------------cut here---------------end--------------->8---
Is there any good reason or is just historical heritage?
I think add-to-list is even more smart adding only if not there already,
then what's the point in using that ugly form?
- Add-to-list or setq append...,
Andrea Crotti <=