all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* don't understand setq-default
@ 2021-04-18 11:40 Emanuel Berg via Users list for the GNU Emacs text editor
  2021-04-18 13:02 ` Omar Polo
  2021-04-18 21:55 ` don't understand setq-default Jean Louis
  0 siblings, 2 replies; 23+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-04-18 11:40 UTC (permalink / raw)
  To: help-gnu-emacs

I don't understand `setq-default', maybe I never did, unsure.

The docstring isn't good, it only describes how it will
happens which is intuitive at that (well, that's good that
it) but not how and why it is used.

You assign a variable I understand

  ultra-hd = 2160

ikr? ultra-hd is 2160!

but full-hd is assigned the default value 1080

  full-hd d= 1080

what does that mean, except for the obvious that d stands for
"diversion"?

the only thing I can make up, is that if the common-sense
variable is unset, it falls back to 1080?

but then where is this value stored?
( actual . default ) won't work
(or actual default)  cool but also won't work
property?

surely you don't have to look for it explicitly?

built-in in some really clever way (really clever =
everything you don't understand. stupid = everything you
already know. and right in between? number 1)

Here is the docstring, it gives the impression everyone
already knows about it. And, if so, I have to give it to it,
probably it makes a whole lot more sense, reight?

(setq-default [VAR VALUE]...)

  Probably introduced at or before Emacs version 18.

Set the default value of variable VAR to VALUE.
VAR, the variable name, is literal (not evaluated);
VALUE is an expression: it is evaluated and its value returned.
The default value of a variable is seen in buffers
that do not have their own values for the variable.

More generally, you can use multiple variables and values, as in
  (setq-default VAR VALUE VAR VALUE...)
This sets each VAR’s default value to the corresponding VALUE.
The VALUE for the Nth VAR can refer to the new default values
of previous VARs.

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2021-04-30  1:04 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-18 11:40 don't understand setq-default Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-18 13:02 ` Omar Polo
2021-04-18 13:39   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-18 13:40     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-18 14:19       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-18 14:59         ` Omar Polo
2021-04-19  3:06           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-19  3:23             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-19  3:33               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-19  6:40                 ` Omar Polo
2021-04-19 13:39                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-19 12:49             ` Thibaut Verron
2021-04-19 17:29               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-18 21:59         ` Jean Louis
2021-04-18 22:28           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-19  6:44             ` Jean Louis
2021-04-19 17:17               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-19  3:49           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-19  6:52             ` Jean Louis
2021-04-19 17:26               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-20  5:44                 ` Rounding percentages... was setq-default Jean Louis
2021-04-30  1:04                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-18 21:55 ` don't understand setq-default Jean Louis

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.