From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?Q?Johan_Bockg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: On removing some obsolete code from subr and core Date: Mon, 07 Nov 2016 22:32:51 +0100 Message-ID: <8737j3j7r0.fsf@gnu.org> 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 1478554433 1734 195.159.176.226 (7 Nov 2016 21:33:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 7 Nov 2016 21:33:53 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 07 22:33:47 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 1c3rXN-0003XT-L9 for ged-emacs-devel@m.gmane.org; Mon, 07 Nov 2016 22:33:05 +0100 Original-Received: from localhost ([::1]:56699 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3rXQ-0001hu-JO for ged-emacs-devel@m.gmane.org; Mon, 07 Nov 2016 16:33:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3rXG-0001ge-RY for emacs-devel@gnu.org; Mon, 07 Nov 2016 16:32:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3rXD-0000z6-Ec for emacs-devel@gnu.org; Mon, 07 Nov 2016 16:32:58 -0500 Original-Received: from smtprelay-h22.telenor.se ([195.54.99.197]:60302) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c3rXD-0000yo-3M for emacs-devel@gnu.org; Mon, 07 Nov 2016 16:32:55 -0500 Original-Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-h22.telenor.se (Postfix) with ESMTP id 6BA55CAA7 for ; Mon, 7 Nov 2016 22:32:53 +0100 (CET) X-SMTPAUTH-B2: [bocjoh] X-SENDER-IP: [85.229.6.57] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2AoGAAq8CBYEDkG5VVdGwEBAQMBAQEJAQEBgy4BAQEBAR+BVIJ5g3mdSJRSggiGJAKCEkISAQIBAQEBAQEBBgEBAQEBAQEBN0WEYgEBAwFWIxALISUPAQQYAQwKGhMaiDYMAbQyiz4BAQEBBgIBJIsTiicFjlSLU6BUkTAlDIEHDQqFKz00h0oBAQE X-IPAS-Result: A2AoGAAq8CBYEDkG5VVdGwEBAQMBAQEJAQEBgy4BAQEBAR+BVIJ5g3mdSJRSggiGJAKCEkISAQIBAQEBAQEBBgEBAQEBAQEBN0WEYgEBAwFWIxALISUPAQQYAQwKGhMaiDYMAbQyiz4BAQEBBgIBJIsTiicFjlSLU6BUkTAlDIEHDQqFKz00h0oBAQE X-IronPort-AV: E=Sophos;i="5.31,459,1473112800"; d="scan'208";a="848701342" Original-Received: from c-3906e555.04-211-6c6b701.cust.bredbandsbolaget.se (HELO muon.localdomain) ([85.229.6.57]) by ipb2.telenor.se with ESMTP; 07 Nov 2016 22:32:52 +0100 Original-Received: by muon.localdomain (Postfix, from userid 1000) id 0923F484225; Mon, 7 Nov 2016 22:32:51 +0100 (CET) In-Reply-To: (Stefan Monnier's message of "Mon, 07 Nov 2016 15:31:08 -0500") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 195.54.99.197 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:209270 Archived-At: Stefan Monnier writes: >> 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. NEWS.18 says this: ** Built-in per-buffer variables improved. Several built-in variables which in the past had a different value in each buffer now behave exactly as if `make-variable-buffer-local' had been done to them. These variables are `tab-width', `ctl-arrow', `truncate-lines', `fill-column', `left-margin', `mode-line-format', `abbrev-mode', `overwrite-mode', `case-fold-search', `auto-fill-hook', `selective-display', `selective-display-ellipses'. To be precise, each variable has a default value which shows through in most buffers and can be accessed with `default-value' and set with `set-default'. Setting the variable with `setq' makes the variable local to the current buffer. Changing the default value has retroactive effect on all buffers in which the variable is not local. The variables `default-case-fold-search', etc., are now obsolete. They now refer to the default value of the variable, which is not quite the same behavior as before, but it should enable old init files to continue to work. and the old behavior was this, according to Emacs 17 Antinews: The function setq-default has been eliminated. Use set-default and quote the variable name, as in (set-default 'variable value) Several built-in variables now are always local to all buffers. These variables are tab-width, ctl-arrow, truncate-lines, fill-column, left-margin, mode-line-format, abbrev-mode, overwrite-mode, case-fold-search, auto-fill-hook, selective-display. set-default does not work with these variables. They do have defaults, but the defaults affect only buffers yet to be created. The only way to set the default for variable foo is to set the variable named default-foo, such as default-case-fold-search and default-fill-column.