help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add-to-list or setq append...


From: Andrea Crotti
Subject: Re: Add-to-list or setq append...
Date: Wed, 04 Aug 2010 02:06:51 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (darwin)

Richard Riley <rileyrg@gmail.com> writes:

> With append you can append a list. e.g
>
> (setq load-path (append load-path '("/usr/local/emacs/site-lisp" 
> "/usr/share/emacs/site-lisp")))
>
> I don't know if add-to-list can do that?

Sure but I was talking about simpler cases, for example

--8<---------------cut here---------------start------------->8---
(setq auto-mode-alist (cons '("\\.ml\\w?" . tuareg-mode) auto-mode-alist))
--8<---------------cut here---------------end--------------->8---

is equivalent to
--8<---------------cut here---------------start------------->8---
(add-to-list 'auto-mode-alist '("\\.ml\\w?" . tuareg-mode))
--8<---------------cut here---------------end--------------->8---

right?
Maybe some years ago add-to-list was not present?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]