From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: On removing some obsolete code from subr and core Date: Mon, 07 Nov 2016 15:31:08 -0500 Message-ID: References: <878tsznpuq.fsf@udel.edu> <83fun6jpeq.fsf@gnu.org> <20161107003235.GA7843@holos.localdomain> <83ins0hshk.fsf@gnu.org> <20161107042415.GA27319@holos.localdomain> <83bmxriatp.fsf@gnu.org> <20161107200828.GA866@holos.localdomain> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1478550768 19287 195.159.176.226 (7 Nov 2016 20:32:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 7 Nov 2016 20:32:48 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 07 21:32:44 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3qap-0003dU-AM for ged-emacs-devel@m.gmane.org; Mon, 07 Nov 2016 21:32:35 +0100 Original-Received: from localhost ([::1]:56444 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3qaq-0003sr-GC for ged-emacs-devel@m.gmane.org; Mon, 07 Nov 2016 15:32:36 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3qaD-0003sj-O1 for emacs-devel@gnu.org; Mon, 07 Nov 2016 15:31:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3qa9-00024j-NJ for emacs-devel@gnu.org; Mon, 07 Nov 2016 15:31:57 -0500 Original-Received: from [195.159.176.226] (port=57225 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c3qa9-00024c-G4 for emacs-devel@gnu.org; Mon, 07 Nov 2016 15:31:53 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1c3qZl-000591-OD for emacs-devel@gnu.org; Mon, 07 Nov 2016 21:31:29 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:EHhjMc/9OjHJle/twvffF9ktDJQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:209268 Archived-At: > you or someone else know better why the default-FOO variables might be > needed again, The only reason would be backward compatibility. > or why they were implemented in the first place. I'm pretty sure it's for historical reasons. I don't know those reasons, tho. My guess goes as follows: - First there were normal vars, and buffer-local vars (e.g. buffer-file-name, major-mode). - The two sets were disjoint. - There was no `default-value' nor `set-default'. - For those buffer-local vars where a default value was needed/made sense, a separate variable was introduced with the convention to name it `default-FOO'. Later on appeared `default-value`, `make-local-variable`, `make-variable-buffer-local`, ... which blurred the line between those two disjoint sets of variables, at which point the `default-FOO' vars became redundant but they were kept for backward compatibility reasons (also it's occasionally handy to let-bind `default-FOO', while doing the same for (default-value 'FOO) requires something like `cl-letf'). Stefan