[Top][All Lists]

[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 09:05:00 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> Where would something like that be needed? Can you point out a couple
> of places in the code where we should use this?

This would be used wherever some generic procedure needed to call a
windowing system-specific procedure. Currently this is done by all
backends defining the same x_* procedure that the generic procedure
uses. This is a method to avoid this name clash (and also getting a step
closer to the goal of using multiple backends simultaneously).

For example, in frame.c (keep_ratio), replace the x_set_offset call

CALL_FOR_WS (f, set_offset, f, pos_x, pos_y, -1)

In frame.c (adjust_frame_size), replace x_set_window_size with:

CALL_FOR_WS (f, set_window_size, f, 0, new_text_width, new_text_height, 1)

In frame.c (do_switch_frame), replace x_get_focus_frame with:

ASSIGN_FOR_WS (f, xfocus, get_focus_frame, f)

I believe these two macros should cover at least most cases, but any
remaining ones should be able to be covered with a similar macro or by
manually retrieving the current frame and then using one of these

reply via email to

[Prev in Thread] Current Thread [Next in Thread]