From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: files.el: Patch to make project-settings optional/customizable Date: Sun, 23 Nov 2008 04:10:14 -0800 (PST) Message-ID: <200811231210.mANCAEv7023193@mothra.ics.uci.edu> References: <5f0ff9220811130629t505badf9kb1bcc380df89a08f@mail.gmail.com> <87prkz4kgh.fsf@cyd.mit.edu> <200811131728.mADHSH2M010654@mothra.ics.uci.edu> <871vxflbxb.fsf@cyd.mit.edu> <200811131848.mADImPMQ011099@mothra.ics.uci.edu> <200811181636.mAIGa9Lx000571@mothra.ics.uci.edu> <87prks6693.fsf@jurta.org> <87iqqjcp3j.fsf@jurta.org> <87zljrh93w.fsf@jurta.org> <200811221940.mAMJeMpj020419@mothra.ics.uci.edu> <87ej13h73g.fsf@jurta.org> <200811222020.mAMKKBcY020496@mothra.ics.uci.edu> <87zljrm7yh.fsf@catnip.gol.com> <200811230810.mAN8A6fp022636@mothra.ics.uci.edu> <87ljvayb18.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1227442273 8603 80.91.229.12 (23 Nov 2008 12:11:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Nov 2008 12:11:13 +0000 (UTC) Cc: Tom Tromey , "T.V. Raman" , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 23 13:12:14 2008 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 1L4Doy-0001BF-HI for ged-emacs-devel@m.gmane.org; Sun, 23 Nov 2008 13:12:13 +0100 Original-Received: from localhost ([127.0.0.1]:45760 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4Dnp-00029L-4w for ged-emacs-devel@m.gmane.org; Sun, 23 Nov 2008 07:11:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L4Dnj-00027s-Av for emacs-devel@gnu.org; Sun, 23 Nov 2008 07:10:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4Dnh-00027g-JL for emacs-devel@gnu.org; Sun, 23 Nov 2008 07:10:53 -0500 Original-Received: from [199.232.76.173] (port=38436 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4Dnh-00027d-DF for emacs-devel@gnu.org; Sun, 23 Nov 2008 07:10:53 -0500 Original-Received: from sallyv2.ics.uci.edu ([128.195.1.120]:45765) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1L4Dnh-0007Ii-Ay for emacs-devel@gnu.org; Sun, 23 Nov 2008 07:10:53 -0500 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id mANCAESr011073; Sun, 23 Nov 2008 04:10:14 -0800 (PST) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id mANCAEv7023193; Sun, 23 Nov 2008 04:10:14 -0800 (PST) In-Reply-To: <87ljvayb18.fsf@jurta.org> (Juri Linkov's message of "Sun, 23 Nov 2008 12:45:59 +0200") Original-Lines: 37 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: mANCAESr011073 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) 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:106030 Archived-At: Juri Linkov writes: > > So there are 2 uses .dir-locals.el 3 lines apart in the same 24 lines function. > > The defconst adds 4 lines. It's hard to keep a straight face and claim > > that the defconst is a good idea. > > (and the 2 uses could be reduced to a single one if we make > > locate-dominating-file return an expanded file name -- which seems to be > > a good idea anyway). > > > > It's kind of painful that this discussion is still going on, it should > > have never occurred in the first place... > > I can't believe we have this kind of discussion :( > > All packages with similar functionality have defcustom for the file name. > dir-locals.el was created in 2005 and dirvars.el in 2002. > For several years they provided customization without problems. This has been discussed to death, and someone said it very well upthread: "it's broken by design". > Our discussion reached the need to make this file name constant. How was it not a constant before the change? > I'm ok with this conclusion. So I created defconst because it > explicitly says that the file name should not be modified by the user, What does that accomplish that the previous code or adding a comment to the code did not? Why is this better encapsulation? > unlike if it was hidden in the function dir-locals-find-file where users > will be the temptation to redefine the whole function without understanding > that the file name have to be constant. Why is the danger of redefining a function greater than simply using setq?