[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere)
From: |
Alex |
Subject: |
Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere) |
Date: |
Sun, 24 Mar 2019 12:30:16 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
> AFAICS, the vast majority of x_* functions defined in w32*.c and ns*.m
> are either static or used from other w32*.c/ns*.m files, i.e. by the
> same window-system back-end. Those can be simply renamed into w32_*
> and ns_*, and that's it.
Sorry, I thought that most/all of the x_* were named that way due to
being used in generic places like image.c and frame.c since I
encountered a good few of them in those two files, but I guess it's good
that I was wrong here. I'll handle those first.
> The remaining small minority should probably simply be added to
> redisplay_interface, and used as we do with the other functions
> there. Some of those are not literally "for redisplay", but I don't
> think it matters too much.
I would find it confusing for procedures not used for redisplay to be
used in the RIF. If there turns out to be a sizeable group of related
x_* procedures, what about adding a separate set of function pointers
for them?
> The only remaining problem that I could spot is that there's a small
> number of Lisp primitives named x-SOMETHING, which are implemented by
> each GUI backend. Example: x-display-pixel-width. I think for now we
> should leave those primitives alone without renaming, and only change
> their implementation to call the x_*, w32_*, or ns_* functions for
> each back-end. Renaming of these primitives can be done as a separate
> step, and we will have to decide on the name pattern (something like
> "xw-SOMETHING, perhaps?), and add obsolete aliases for backward
> compatibility.
IMO it would be nicer to get rid of the `x' entirely, and go for `gui'
as the generic prefix, and just `ns' and `w32' as the backend prefixes.
Where would be the best place to add the obsolete aliases? For example,
I'm not sure the best place to put the obsolete call for
x-stretch-cursor (now gui-stretch-cursor).
> Are there any other issues related to this that I missed?
I noticed that several procedures in frame.c contained this comment:
/* I think this should be done with a hook. */
Which seems to be from 1993. Do you agree with this? Several of the x_*
could be turned into these hooks.
P.S. I happen to have some code that refactors the tooltip code in
xfns.c and w32fns.c (nsfns.c's is a bit too different, unfortunately)
into generic procedures that call out to backend procedures. I figured
that it would be nicer to create a new generic file guifns.c to host
these generalizations rather than put them in a file like frame.c; would
you rather not have such a new file?
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), (continued)
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Alex, 2019/03/23
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Eli Zaretskii, 2019/03/23
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Alex, 2019/03/24
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Alex, 2019/03/24
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Eli Zaretskii, 2019/03/24
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Alex, 2019/03/24
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Yuri Khan, 2019/03/24
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Eli Zaretskii, 2019/03/24
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Eli Zaretskii, 2019/03/24
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Eli Zaretskii, 2019/03/24
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere),
Alex <=
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Eli Zaretskii, 2019/03/24
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Alex, 2019/03/25
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Eli Zaretskii, 2019/03/30
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Alex, 2019/03/30
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Eli Zaretskii, 2019/03/30
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Alex, 2019/03/30
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Eli Zaretskii, 2019/03/30
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Alex, 2019/03/30
- Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere), Eli Zaretskii, 2019/03/31