* Possible build configurations
@ 2024-01-20 17:54 Stefan Monnier
2024-01-20 18:11 ` Eli Zaretskii
2024-01-21 0:50 ` Po Lu
0 siblings, 2 replies; 6+ messages in thread
From: Stefan Monnier @ 2024-01-20 17:54 UTC (permalink / raw)
To: emacs-devel
Is it currently possible to have
(featurep 'xinput2)
or
(featurep 'x)
be true at the same time as
(or (featurep 'w32-win) (featurep 'ns-win)
(featurep 'haiku-win) (featurep 'pgtk-win)
(featurep 'android-win))
?
According to my reading of the code, the answer is no: these features
are all defined in their respective `<GUI>term.c` or `<GUI>fns.c` and
the current `configure.ac` (and I think current C code) supports only
a single <GUI> active at the same time.
Can someone confirm this?
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Possible build configurations
2024-01-20 17:54 Possible build configurations Stefan Monnier
@ 2024-01-20 18:11 ` Eli Zaretskii
2024-01-20 20:06 ` Stefan Monnier
2024-01-21 0:50 ` Po Lu
1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2024-01-20 18:11 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Sat, 20 Jan 2024 12:54:38 -0500
>
> Is it currently possible to have
>
> (featurep 'xinput2)
>
> or
>
> (featurep 'x)
>
> be true at the same time as
>
> (or (featurep 'w32-win) (featurep 'ns-win)
> (featurep 'haiku-win) (featurep 'pgtk-win)
> (featurep 'android-win))
>
> ?
>
> According to my reading of the code, the answer is no: these features
> are all defined in their respective `<GUI>term.c` or `<GUI>fns.c` and
> the current `configure.ac` (and I think current C code) supports only
> a single <GUI> active at the same time.
>
> Can someone confirm this?
The FOO-win features are provided by the corresponding FOO-win.el
files in lisp/term/, not by FOOterm.c. So I'm not sure what you are
asking about here. For example, my rading of the code is that 'x and
'xinput2 _can_ coexist with 'pgtk-win (but not with any other FOO-win,
AFAICT).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Possible build configurations
2024-01-20 18:11 ` Eli Zaretskii
@ 2024-01-20 20:06 ` Stefan Monnier
2024-01-20 20:16 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2024-01-20 20:06 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
> The FOO-win features are provided by the corresponding FOO-win.el
> files in lisp/term/, not by FOOterm.c.
Oh, right, I was confusing the `<GUI>` and `<GUI>-win` features.
This said, the `<GUI>-win.el` files are loaded by `loadup.el` only
when the corresponding `<GUI>` is defined and those are defined
in `<GUI>term.c`, so I think the end result is "the same".
> So I'm not sure what you are asking about here. For example, my
> rading of the code is that 'x and 'xinput2 _can_ coexist with
> 'pgtk-win (but not with any other FOO-win, AFAICT).
Hmm... interesting. `pgtk-win` is provided by `pgtk-win.el`
which is loaded in loadup via:
(if (featurep 'pgtk)
(progn
(load "pgtk-dnd")
(load "term/common-win")
(load "term/pgtk-win")))
so it's only defined if the `pgtk` feature is provided. In turn
grep Fprovide.\*pgtk ~/src/emacs/main/src/**/*.[ch]
suggests it's provided only by `pgtkterm.c` and my reading of
`configure.ac` suggests `pgtkterm.c` and `xfns.c` (the file where
`xinput2` and `x` are provided) can't be both linked into the `emacs`
executable at the same time.
Am I missing something?
Stefan
PS: As for why I'm asking, this is basically to determine if
;; FIXME: Yuck!
(if (or (featurep 'w32-win) (featurep 'ns-win)
(featurep 'haiku-win) (featurep 'pgtk-win)
(featurep 'android-win))
(if (featurep 'xinput2)
nil
(unless (featurep 'x)
t))
t)
is just a roundabout way to write `t`.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Possible build configurations
2024-01-20 20:06 ` Stefan Monnier
@ 2024-01-20 20:16 ` Eli Zaretskii
0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2024-01-20 20:16 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org
> Date: Sat, 20 Jan 2024 15:06:41 -0500
>
> > So I'm not sure what you are asking about here. For example, my
> > rading of the code is that 'x and 'xinput2 _can_ coexist with
> > 'pgtk-win (but not with any other FOO-win, AFAICT).
>
> Hmm... interesting. `pgtk-win` is provided by `pgtk-win.el`
> which is loaded in loadup via:
>
> (if (featurep 'pgtk)
> (progn
> (load "pgtk-dnd")
> (load "term/common-win")
> (load "term/pgtk-win")))
>
> so it's only defined if the `pgtk` feature is provided. In turn
>
> grep Fprovide.\*pgtk ~/src/emacs/main/src/**/*.[ch]
>
> suggests it's provided only by `pgtkterm.c` and my reading of
> `configure.ac` suggests `pgtkterm.c` and `xfns.c` (the file where
> `xinput2` and `x` are provided) can't be both linked into the `emacs`
> executable at the same time.
>
> Am I missing something?
I think I confused pgtk with gtk.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Possible build configurations
2024-01-20 17:54 Possible build configurations Stefan Monnier
2024-01-20 18:11 ` Eli Zaretskii
@ 2024-01-21 0:50 ` Po Lu
2024-01-21 4:13 ` Stefan Monnier
1 sibling, 1 reply; 6+ messages in thread
From: Po Lu @ 2024-01-21 0:50 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Is it currently possible to have
>
> (featurep 'xinput2)
>
> or
>
> (featurep 'x)
>
> be true at the same time as
Not as yet, thanks.
> (or (featurep 'w32-win) (featurep 'ns-win)
> (featurep 'haiku-win) (featurep 'pgtk-win)
> (featurep 'android-win))
>
> ?
>
> According to my reading of the code, the answer is no: these features
> are all defined in their respective `<GUI>term.c` or `<GUI>fns.c` and
> the current `configure.ac` (and I think current C code) supports only
> a single <GUI> active at the same time.
>
> Can someone confirm this?
This is correct.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Possible build configurations
2024-01-21 0:50 ` Po Lu
@ 2024-01-21 4:13 ` Stefan Monnier
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2024-01-21 4:13 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
>> be true at the same time as
> Not as yet, thanks.
Thank you (and Eli as well) for confirming my suspicion.
So I simplified the `mwheel.el` code accordingly.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-01-21 4:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-20 17:54 Possible build configurations Stefan Monnier
2024-01-20 18:11 ` Eli Zaretskii
2024-01-20 20:06 ` Stefan Monnier
2024-01-20 20:16 ` Eli Zaretskii
2024-01-21 0:50 ` Po Lu
2024-01-21 4:13 ` Stefan Monnier
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).