From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Emacs 21 and w3 on Debian Date: Tue, 31 May 2005 10:41:17 -0600 Message-ID: References: <87sm0fbjx4.fsf@tiger.rapttech.com.au> <874qcvqar0.fsf@spamfoil.invalid> <87oeb2c2x5.fsf@tiger.rapttech.com.au> <87fywebcp7.fsf@tiger.rapttech.com.au> <87ll66pavk.fsf@spamfoil.invalid> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1117557824 20192 80.91.229.2 (31 May 2005 16:43:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 May 2005 16:43:44 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 31 18:43:37 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dd9p6-0007Vj-8K for geh-help-gnu-emacs@m.gmane.org; Tue, 31 May 2005 18:42:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dd9uD-000775-N4 for geh-help-gnu-emacs@m.gmane.org; Tue, 31 May 2005 12:47:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dd9tl-00073J-QE for help-gnu-emacs@gnu.org; Tue, 31 May 2005 12:47:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dd9ti-00071e-Ur for help-gnu-emacs@gnu.org; Tue, 31 May 2005 12:47:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dd9ti-00070K-My for help-gnu-emacs@gnu.org; Tue, 31 May 2005 12:47:22 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Dd9s9-0000vk-3C for help-gnu-emacs@gnu.org; Tue, 31 May 2005 12:45:45 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Dd9m7-000706-Ql for help-gnu-emacs@gnu.org; Tue, 31 May 2005 18:39:31 +0200 Original-Received: from 207.167.42.60 ([207.167.42.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 May 2005 18:39:31 +0200 Original-Received: from ihs_4664 by 207.167.42.60 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 May 2005 18:39:31 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 50 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.60 User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: 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:27097 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:27097 Klaus Straubinger wrote: > Kevin Rodgers wrote: >>Is it necessary to destructively modify url-callback-arguments? > > I am not sure because I have no complete overview over the URL library. > But in many places dynamic binding is used where one indeed must modify > the globally visible value of variables. That is not what I asked. One can change the globally visible value of a variable without destructively modifying the original list structure. If you intend to change the variable permanently, you use setq; if you intend to change it temporarily (e.g. for the duration of a function call), you use let. But you should destructively modify the original value only when changing the variable permanently, and only if you understand the implications (namely, that you are modifying by side-effect any other variable that happens to share that data structure). > See for example the definition > of the function "url-http-activate-callback". I don't see any modification of a global variable (permanent or temporary, destructive or not) in the CVS implementation at http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/url/url-http.el?rev=HEAD&content-type=text/vnd.viewcvs-markup > By the way: The code uses > "(declare (special ...))" to mark these cases and to pacify the > byte-compiler. Someone with CVS write access could replace these with an > equivalent non-CL statement, i.e., append the named variables to > "byte-compile-bound-variables". No, those declarations are there to pacify the Common Lisp cravings of the author. The right thing to do is to defvar the global variables at the top level (either in url-http.el itself or in one of the libraries it requires). >>But (append (list x) ...) is better expressed as (cons x ...): >> >> (cons redirect-uri (cdr url-callback-arguments)) > > Isn't that a matter of taste? I find it more intuitive to use "append" > and "list" for list operations and "cons" for simple cells. But I am no > lisp expert. Yes, I suppose it is a matter of style. But the fact is that cons is the primitive function for constructing a new list from an element and an old list. And 2 function calls are seldom more readable than 1. -- Kevin Rodgers