unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Why subr.el doesn't provide a feature?
@ 2019-08-29  3:59 Zhu Zihao
  2019-08-29  7:12 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Zhu Zihao @ 2019-08-29  3:59 UTC (permalink / raw)
  To: emacs-devel; +Cc: eliz


There's no form like "(provide 'subr)" in subr.el. I'm interesting in the reason
of not doing such thing? Is it because it will cause conflict during the
bootstrap? 

Any answer will be appreciated.

--

Zihao





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

* Re: Why subr.el doesn't provide a feature?
  2019-08-29  3:59 Why subr.el doesn't provide a feature? Zhu Zihao
@ 2019-08-29  7:12 ` Eli Zaretskii
  2019-08-29 10:59   ` Zhu Zihao
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2019-08-29  7:12 UTC (permalink / raw)
  To: Zhu Zihao; +Cc: emacs-devel

> Date: Thu, 29 Aug 2019 11:59:30 +0800
> From: Zhu Zihao <all_but_last@163.com>
> Cc: eliz@gnu.org
> 
> There's no form like "(provide 'subr)" in subr.el. I'm interesting in the reason
> of not doing such thing? Is it because it will cause conflict during the
> bootstrap? 

Because it's preloaded, I guess.



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

* Re: Why subr.el doesn't provide a feature?
  2019-08-29  7:12 ` Eli Zaretskii
@ 2019-08-29 10:59   ` Zhu Zihao
  2019-08-29 12:38     ` Eli Zaretskii
  2019-08-31 10:12     ` Basil L. Contovounesios
  0 siblings, 2 replies; 9+ messages in thread
From: Zhu Zihao @ 2019-08-29 10:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Zhu Zihao, emacs-devel

On Thu, 29 Aug 2019 15:12:08 +0800,
Eli Zaretskii wrote:
> 
> > Date: Thu, 29 Aug 2019 11:59:30 +0800
> > From: Zhu Zihao <all_but_last@163.com>
> > Cc: eliz@gnu.org
> > 
> > There's no form like "(provide 'subr)" in subr.el. I'm interesting in the reason
> > of not doing such thing? Is it because it will cause conflict during the
> > bootstrap? 
> 
> Because it's preloaded, I guess.

Should we add a provide form for subr? I ask this question because I see a elisp
file wrote "(require 'subr)" and no doubt that it failed to run because subr.el
didn't provide such feature.

Though it's rare condition because we just use subr.el without requiring it. But
each elisp library should provide a feature whose name is same as filename of
library on regular basis.




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

* Re: Why subr.el doesn't provide a feature?
  2019-08-29 10:59   ` Zhu Zihao
@ 2019-08-29 12:38     ` Eli Zaretskii
  2019-08-31 10:12     ` Basil L. Contovounesios
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2019-08-29 12:38 UTC (permalink / raw)
  To: Zhu Zihao; +Cc: all_but_last, emacs-devel

> Date: Thu, 29 Aug 2019 18:59:00 +0800
> From: Zhu Zihao <all_but_last@163.com>
> Cc: Zhu Zihao <all_but_last@163.com>,
> 	emacs-devel@gnu.org
> 
> Should we add a provide form for subr?

Why is it needed?

> I ask this question because I see a elisp
> file wrote "(require 'subr)" and no doubt that it failed to run because subr.el
> didn't provide such feature.

That's a bug in that Lisp file, isn't it?



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

* Re: Why subr.el doesn't provide a feature?
  2019-08-29 10:59   ` Zhu Zihao
  2019-08-29 12:38     ` Eli Zaretskii
@ 2019-08-31 10:12     ` Basil L. Contovounesios
  2019-08-31 12:15       ` Zhu Zihao
  2019-09-01  3:30       ` Richard Stallman
  1 sibling, 2 replies; 9+ messages in thread
From: Basil L. Contovounesios @ 2019-08-31 10:12 UTC (permalink / raw)
  To: Zhu Zihao; +Cc: Eli Zaretskii, emacs-devel

Zhu Zihao <all_but_last@163.com> writes:

> Should we add a provide form for subr? I ask this question because I see a elisp
> file wrote "(require 'subr)" and no doubt that it failed to run because subr.el
> didn't provide such feature.

Can you show which file this was in?
Perhaps the author meant to write (require 'subr-x).

-- 
Basil



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

* Re: Why subr.el doesn't provide a feature?
  2019-08-31 10:12     ` Basil L. Contovounesios
@ 2019-08-31 12:15       ` Zhu Zihao
  2019-08-31 13:21         ` Basil L. Contovounesios
  2019-09-01  3:30       ` Richard Stallman
  1 sibling, 1 reply; 9+ messages in thread
From: Zhu Zihao @ 2019-08-31 12:15 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: Eli Zaretskii, Zhu Zihao, emacs-devel

On Sat, 31 Aug 2019 18:12:36 +0800,
Basil L. Contovounesios wrote:
> 
> Zhu Zihao <all_but_last@163.com> writes:
> 
> > Should we add a provide form for subr? I ask this question because I see a elisp
> > file wrote "(require 'subr)" and no doubt that it failed to run because subr.el
> > didn't provide such feature.
> 
> Can you show which file this was in?
> Perhaps the author meant to write (require 'subr-x).
> 
> -- 
> Basil
Thanks for your intention, but I think it just a misnomer because the author of
that elisp file had require subr-x explicitly.

And now subr requirement had been removed in
https://github.com/manateelazycat/snails/commit/4677daf80a8ee6d5202b98d1acde7a99c2294ec9

IMO, missing provide form is a counter-intuitive behavior because almost all
library have one(even backquote.el). I can't find a reason for why subr lacks
this, so I guess adding provide form for subr may breaks emacs bootstrap.




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

* Re: Why subr.el doesn't provide a feature?
  2019-08-31 12:15       ` Zhu Zihao
@ 2019-08-31 13:21         ` Basil L. Contovounesios
  0 siblings, 0 replies; 9+ messages in thread
From: Basil L. Contovounesios @ 2019-08-31 13:21 UTC (permalink / raw)
  To: Zhu Zihao; +Cc: Eli Zaretskii, emacs-devel

Zhu Zihao <all_but_last@163.com> writes:

> IMO, missing provide form is a counter-intuitive behavior because almost all
> library have one(even backquote.el). I can't find a reason for why subr lacks
> this, so I guess adding provide form for subr may breaks emacs bootstrap.

Since subr.el is as "core" as Elisp can get, providing it as a named
feature isn't strictly necessary; most Emacs versions I'm familiar with
can simply assume that it is baked in.

Features added to subr.el later, such as hashtable-print-readable, are
indeed provided as a named feature in subr.el.

I am not against adding (provide 'subr) to subr.el for aesthetic
reasons, but functionally it is not strictly "required". ;)

-- 
Basil



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

* Re: Why subr.el doesn't provide a feature?
  2019-08-31 10:12     ` Basil L. Contovounesios
  2019-08-31 12:15       ` Zhu Zihao
@ 2019-09-01  3:30       ` Richard Stallman
  2019-09-01 16:02         ` Basil L. Contovounesios
  1 sibling, 1 reply; 9+ messages in thread
From: Richard Stallman @ 2019-09-01  3:30 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: eliz, all_but_last, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

Subr is always supposed to be loaded, so is there ever a real
need to call require about it?

-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





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

* Re: Why subr.el doesn't provide a feature?
  2019-09-01  3:30       ` Richard Stallman
@ 2019-09-01 16:02         ` Basil L. Contovounesios
  0 siblings, 0 replies; 9+ messages in thread
From: Basil L. Contovounesios @ 2019-09-01 16:02 UTC (permalink / raw)
  To: Richard Stallman; +Cc: eliz, all_but_last, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> Subr is always supposed to be loaded, so is there ever a real
> need to call require about it?

AFAIK, no.

-- 
Basil



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

end of thread, other threads:[~2019-09-01 16:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-29  3:59 Why subr.el doesn't provide a feature? Zhu Zihao
2019-08-29  7:12 ` Eli Zaretskii
2019-08-29 10:59   ` Zhu Zihao
2019-08-29 12:38     ` Eli Zaretskii
2019-08-31 10:12     ` Basil L. Contovounesios
2019-08-31 12:15       ` Zhu Zihao
2019-08-31 13:21         ` Basil L. Contovounesios
2019-09-01  3:30       ` Richard Stallman
2019-09-01 16:02         ` Basil L. Contovounesios

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).