From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Customizing the VC backend order Date: Sat, 11 Aug 2007 14:05:52 +0200 Message-ID: <85ejiawa1r.fsf@lola.goethe.zz> References: <85lkcixw6p.fsf@lola.goethe.zz> <85ir7mwdkr.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1186833973 11682 80.91.229.12 (11 Aug 2007 12:06:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 11 Aug 2007 12:06:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: dhruva Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 11 14:06:07 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IJpjG-0001dt-JH for ged-emacs-devel@m.gmane.org; Sat, 11 Aug 2007 14:06:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IJpjF-0005iw-VD for ged-emacs-devel@m.gmane.org; Sat, 11 Aug 2007 08:06:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IJpjC-0005ig-Kv for emacs-devel@gnu.org; Sat, 11 Aug 2007 08:05:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IJpjA-0005iU-6F for emacs-devel@gnu.org; Sat, 11 Aug 2007 08:05:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IJpjA-0005iR-37 for emacs-devel@gnu.org; Sat, 11 Aug 2007 08:05:56 -0400 Original-Received: from mail-in-12.arcor-online.net ([151.189.21.52]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IJpj9-000791-Hf for emacs-devel@gnu.org; Sat, 11 Aug 2007 08:05:55 -0400 Original-Received: from mail-in-03-z2.arcor-online.net (mail-in-03-z2.arcor-online.net [151.189.8.15]) by mail-in-12.arcor-online.net (Postfix) with ESMTP id 955A54CB85; Sat, 11 Aug 2007 14:05:53 +0200 (CEST) Original-Received: from mail-in-05.arcor-online.net (mail-in-05.arcor-online.net [151.189.21.45]) by mail-in-03-z2.arcor-online.net (Postfix) with ESMTP id 71CF52D29B9; Sat, 11 Aug 2007 14:05:53 +0200 (CEST) Original-Received: from lola.goethe.zz (dslb-084-061-049-066.pools.arcor-ip.net [84.61.49.66]) by mail-in-05.arcor-online.net (Postfix) with ESMTP id 0E0EA2BAA22; Sat, 11 Aug 2007 14:05:52 +0200 (CEST) Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 541911C3C79D; Sat, 11 Aug 2007 14:05:52 +0200 (CEST) In-Reply-To: (dhruva's message of "Sat\, 11 Aug 2007 16\:30\:51 +0530") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-Virus-Scanned: ClamAV 0.91.1/3923/Sat Aug 11 10:03:45 2007 on mail-in-05.arcor-online.net X-Virus-Status: Clean X-Detected-Kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:76356 Archived-At: Please keep the list copied as long as there is nothing involved concerning only myself. dhruva writes: > On 8/11/07, David Kastrup wrote: >> dhruva writes: >> Oh no, it is not an optimization. Lisp programs _are_ lists. It >> would be a bug if a quoted list inside of a Lisp program would be >> magically replaced by something new every time the program was run. > > Since lists are mutable (from the PYTHON usage), I must be able to > do an inplace deletion and insertion in a list. Why would you want to do _inplace_ deletion or insertion on '(Hg)? That does not make sense, unless you want the meaning of '(Hg) to change. > Going back to my vc-handled-backends list, if I can inplace delete > "Hg" entry and prepend it with "Hg", I need not call a setq. There is neither reason nor usefulness in not calling setq: setq does not copy lists. > Can this be done, inplace modifications? Apologies for asking too > much from you, if you point me to a low level document, I will put > in efforts to learn. (info "(elisp) Rearrangement") aka explains this quite carefully. What you probably wanted was something like (setq vc-handled-backends (cons 'Hg (delq 'Hg vc-handled-backends))) This destructively changes the old vc-handled-backends (unless it does not contain Hg at all, or only as the first element) and prepends Hg. As long as nobody kept the original (not a copy) of the old vc-handled-backends (which will get its Hg deleted without getting anything prepended), this is perfectly fine. What isn't, is destructively manipulating '(Hg). -- David Kastrup, Kriemhildstr. 15, 44793 Bochum