all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Johan Bockgård" <bojohan@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: On removing some obsolete code from subr and core
Date: Mon, 07 Nov 2016 22:32:51 +0100	[thread overview]
Message-ID: <8737j3j7r0.fsf@gnu.org> (raw)
In-Reply-To: <jwvy40vqbw7.fsf-monnier+gmane.emacs.devel@gnu.org> (Stefan Monnier's message of "Mon, 07 Nov 2016 15:31:08 -0500")

Stefan Monnier <monnier@iro.umontreal.ca> 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.




  reply	other threads:[~2016-11-07 21:32 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04 16:59 On removing some obsolete code from subr and core Mark Oteiza
2016-11-05  8:24 ` John Wiegley
2016-11-05  8:34 ` Eli Zaretskii
2016-11-05 13:50   ` Mark Oteiza
2016-11-05 17:59     ` Eli Zaretskii
2016-11-06 16:58       ` Mark Oteiza
2016-11-05 17:50   ` Stefan Monnier
2016-11-06 17:05     ` Mark Oteiza
2016-11-06 22:32       ` Stefan Monnier
2016-11-07  0:32   ` Mark Oteiza
2016-11-07  3:35     ` Eli Zaretskii
2016-11-07  4:24       ` Mark Oteiza
2016-11-07 15:11         ` Eli Zaretskii
2016-11-07 20:08           ` Mark Oteiza
2016-11-07 20:13             ` Eli Zaretskii
2016-11-07 20:25               ` Mark Oteiza
2016-11-08  6:51                 ` Noam Postavsky
2016-11-07 20:31             ` Stefan Monnier
2016-11-07 21:32               ` Johan Bockgård [this message]
2016-11-08 13:00                 ` Stefan Monnier
2016-11-08 19:49                   ` John Wiegley
2016-11-05 15:51 ` Clément Pit--Claudel
2016-11-05 15:52 ` Clément Pit--Claudel
2016-11-05 16:42   ` Dmitry Gutov
2016-11-05 17:23     ` Clément Pit--Claudel
2016-11-05 17:31       ` Dmitry Gutov
2016-11-05 18:03         ` Clément Pit--Claudel
2016-11-05 15:57 ` Clément Pit--Claudel
2016-11-05 17:56   ` Stefan Monnier
2016-11-05 19:14     ` Clément Pit--Claudel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737j3j7r0.fsf@gnu.org \
    --to=bojohan@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.