From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andrea Crotti Newsgroups: gmane.emacs.help Subject: Re: Add-to-list or setq append... Date: Wed, 04 Aug 2010 02:06:51 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1280880523 25381 80.91.229.12 (4 Aug 2010 00:08:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 4 Aug 2010 00:08:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 04 02:08:42 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OgRWg-00054X-6G for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Aug 2010 02:08:40 +0200 Original-Received: from localhost ([127.0.0.1]:58658 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OgRW8-0006bM-B2 for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Aug 2010 20:07:32 -0400 Original-Received: from [140.186.70.92] (port=43987 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OgRVg-0006ZQ-G9 for help-gnu-emacs@gnu.org; Tue, 03 Aug 2010 20:07:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OgRVe-00028i-QQ for help-gnu-emacs@gnu.org; Tue, 03 Aug 2010 20:07:03 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:36059) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgRVe-00028N-IU for help-gnu-emacs@gnu.org; Tue, 03 Aug 2010 20:07:02 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OgRVc-0004vj-S8 for help-gnu-emacs@gnu.org; Wed, 04 Aug 2010 02:07:00 +0200 Original-Received: from xdsl-89-0-32-170.netcologne.de ([89.0.32.170]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Aug 2010 02:07:00 +0200 Original-Received: from andrea.crotti.0 by xdsl-89-0-32-170.netcologne.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Aug 2010 02:07:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: xdsl-89-0-32-170.netcologne.de User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (darwin) Cancel-Lock: sha1:8/kj50vReFAbndh6HwFVPpbJ5wY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:74413 Archived-At: Richard Riley 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?