[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `append' vs. `nconc'
From: |
Emanuel Berg |
Subject: |
Re: `append' vs. `nconc' |
Date: |
Thu, 31 Dec 2015 19:35:52 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Teemu Likonen <tlikonen@iki.fi> 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
- Re: `append' vs. `nconc', (continued)
- Message not available
- Re: `append' vs. `nconc', Pascal J. Bourguignon, 2015/12/31
- Re: `append' vs. `nconc', Emanuel Berg, 2015/12/31
- Re: `append' vs. `nconc', tomas, 2015/12/31
- side effects, list sharing [was: `append' vs. `nconc'], Drew Adams, 2015/12/31
- Re: side effects, list sharing [was: `append' vs. `nconc'], Emanuel Berg, 2015/12/31
- RE: side effects, list sharing [was: `append' vs. `nconc'], Drew Adams, 2015/12/31
- Re: `append' vs. `nconc', Emanuel Berg, 2015/12/31
- Message not available
- Re: `append' vs. `nconc', Barry Margolin, 2015/12/31
- Message not available
- Re: `append' vs. `nconc', Pascal J. Bourguignon, 2015/12/31
- Message not available
- Re: `append' vs. `nconc', Teemu Likonen, 2015/12/31
- Re: `append' vs. `nconc',
Emanuel Berg <=
- Re: `append' vs. `nconc', Teemu Likonen, 2015/12/31
- Message not available
- Re: `append' vs. `nconc', Pascal J. Bourguignon, 2015/12/30