From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: `append' vs. `nconc' Date: Thu, 31 Dec 2015 19:35:52 +0100 Message-ID: <87mvsqv52v.fsf@debian.uxu> References: <568164D8.6050700@ojkastl.de> <87io3iyr7t.fsf@debian.uxu> <87si2kezg1.fsf@mithlond.arda> <87a8osrlj4.fsf_-_@debian.uxu> <87lh8bgafa.fsf@mithlond.arda> <87io3fdqfm.fsf@mithlond.arda> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1451586987 10893 80.91.229.3 (31 Dec 2015 18:36:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Dec 2015 18:36:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 31 19:36:19 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aEi5C-00071w-QO for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Dec 2015 19:36:18 +0100 Original-Received: from localhost ([::1]:56521 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEi58-0003jX-UN for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Dec 2015 13:36:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEi4z-0003jQ-Fn for help-gnu-emacs@gnu.org; Thu, 31 Dec 2015 13:36:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aEi4v-00068h-FP for help-gnu-emacs@gnu.org; Thu, 31 Dec 2015 13:36:05 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:50186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEi4v-00068R-8X for help-gnu-emacs@gnu.org; Thu, 31 Dec 2015 13:36:01 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aEi4r-0006k2-W0 for help-gnu-emacs@gnu.org; Thu, 31 Dec 2015 19:35:58 +0100 Original-Received: from nl106-137-56.student.uu.se ([130.243.137.56]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 31 Dec 2015 19:35:57 +0100 Original-Received: from embe8573 by nl106-137-56.student.uu.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 31 Dec 2015 19:35:57 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 51 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: nl106-137-56.student.uu.se Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:y9TK73H8XY1PMQ/n7mhG4SFMzVY= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:108555 Archived-At: Teemu Likonen writes: > NCONC doesn't touch the elements (i.e., CAR values > of conses) so this is fine: > > (setq foo (nconc (list '(a . 1) '(b . 2)) foo)) OK! Because, many cases where I replaced `apply' by `nconc' were lists of lists. What is the reason one has to use `list'? (I suppose the ` isn't safe, either.) And: In Pascal's examples he always used `setf'. The help says it can be used for places as well as for symbols. In the examples tho there has been only symbols if I'm not mistaken. (setq completion-ignored-extensions (nconc completion-ignored-extensions (list ".bcf" ".run.xml")) ) (setq ispell-skip-region-alist (nconc ispell-skip-region-alist (list '("`" . "\\(`\\|'\\)"))) ) (let*((write (list '("hp" "http://user.it.uu.se/~embe8573") '("lenght" "length") ;; ... '("thedate" "" (lambda () (interactive) (show-time-and-date t))) ; INSERT )) (groups (list '("ctt" "comp.text.tex") '("geg" "gmane.emacs.gnus") ;; ... )) (both (nconc write groups))) (define-abbrev-table 'global-abbrev-table both) ) (let ((modes (list '("\\.bal\\'" . balance-mode) '("\\.gpi\\'" . gnuplot-mode) ;; ... ))) (setq auto-mode-alist (nconc modes auto-mode-alist)) ) -- underground experts united http://user.it.uu.se/~embe8573