GNU bug report logs - #67848
29.1; Fix usage of `setq-default' and add explanation

Previous Next

Package: emacs;

Reported by: Xiyue Deng <manphiz <at> gmail.com>

Date: Sat, 16 Dec 2023 11:19:01 UTC

Severity: normal

Tags: patch

Found in version 29.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Xiyue Deng <manphiz <at> gmail.com>
Cc: 67848 <at> debbugs.gnu.org
Subject: bug#67848: 29.1; Fix usage of `setq-default' and add explanation
Date: Sat, 23 Dec 2023 11:00:58 +0200
> From: Xiyue Deng <manphiz <at> gmail.com>
> Date: Sat, 16 Dec 2023 03:18:20 -0800
> 
> 
> In the lisp intro book, there is a discrepancy in the section "Text and
> Auto Fill mode" where the first code example uses "(setq-default
> major-mode 'text-mode)"[1] but in the later explanation part the
> function was changed to `setq'[2].  It looks like the original change[3]
> was to deprecate the usage of "default-major-mode", but forgot to update
> the other part.
> 
> I have prepared a patch to make it consistent, and also added some extra
> text to explain why `setq-default' is required for a buffer local
> variable using a foot note.  Will add in the next mail.

Thanks, but I think it's wrong to use setq-default here, since that
makes Text mode the default major-mode (instead of Fundamental), which
is not what most people would want.

I think we should instead do one of the following:

  . convert the _first_ setq-default to setq
  . do as above, and also explain that people who really want Emacs to
    start new buffers in Text mode should use setq-default

Would you like to amend your patch along these lines?




This bug report was last modified 1 year and 149 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.