From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alex Newsgroups: gmane.emacs.devel Subject: Re: Renaming non-X x_* procedures in xdisp.c (and elsewhere) Date: Sun, 24 Mar 2019 09:05:00 -0600 Message-ID: <87k1goqpnn.fsf@gmail.com> References: <87wokp4okn.fsf@gmail.com> <83ef6xpo6b.fsf@gnu.org> <0f4be9a6-6e09-f55d-9f58-2a15aef264cd@cs.ucla.edu> <837ecpplw8.fsf@gnu.org> <871s2w510a.fsf@gmail.com> <922F9B91-2E9E-45F6-BB96-66CAE5E9FB81@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="134632"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) Cc: Paul Eggert , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 24 16:06:40 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h84hs-000Yu9-7O for ged-emacs-devel@m.gmane.org; Sun, 24 Mar 2019 16:06:40 +0100 Original-Received: from localhost ([127.0.0.1]:57293 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h84hr-0000bF-8I for ged-emacs-devel@m.gmane.org; Sun, 24 Mar 2019 11:06:39 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h84hk-0000Ym-P1 for emacs-devel@gnu.org; Sun, 24 Mar 2019 11:06:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h84hj-0006cv-Os for emacs-devel@gnu.org; Sun, 24 Mar 2019 11:06:32 -0400 Original-Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:44895) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h84hj-0006Y3-F4; Sun, 24 Mar 2019 11:06:31 -0400 Original-Received: by mail-pg1-x531.google.com with SMTP id i2so4665774pgj.11; Sun, 24 Mar 2019 08:06:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Hf72pEouQCgJ/1eJT+FITSlVj2i+6wQqwITal0/orrg=; b=tj8ld1WaRFYcj7rS0Ki5McK9yUQ86hCOb7A/YODH3HDyzfdQ40P0WxSBzoLCPorDVD AW9E2SUopqA0YQHVvAW723EaEgfZu5pjBiZ/ExAq1wn7iuwycd3M+WXh8yAxuM36Ra+1 1ydZDRfobUd60ToFxcXGJrgqOwb4FgVvn3+jOWxanrLUsXCGHLR/n39zYHxiYQXzOCa8 UC09mc7NFiaKWgDcJo65YjSwtRM762cNCQVNMS04iSeMcJcw2a1a+q4ssz4kKo1wDglh 0TAgH44H3KewacrdeJlrOAyuDy2rxSmsZ4zxjVjFU+K0ayDudHzwSsfzGM/bzb/RFi1g io5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Hf72pEouQCgJ/1eJT+FITSlVj2i+6wQqwITal0/orrg=; b=PxcJ5B6e6ei2TVxyyIYKmwXXYM3yM8WyyU6mwZQM6Ldq1Ban/zRM3lRJ7CO5pWiAYV VGACSl44JE3wlu2ZqqMXKnTeCT+p1YlMuLoqaKCozhQKnlkHnxEZGw8i+4szk9riWXTF i1uBkVZ3LVdODKlTe2rveuPEW+Rc2sp2gegYVQTM9VoluM0DBJqVTs+MLqbQr6GtZ8GP IIPrnqhqfZq5ubr8Zxo5kUg5KVuXbm4qCavPP1hNOhCakp3mJkvIAyN7URpBclN36rni 5YOqUP6ubMfjLxCRhaAb/suqCDqCSGZbiXiFjkXxEThONi4QFekaZneMLAJK1R6SKf/V K37Q== X-Gm-Message-State: APjAAAXeAIzZKGWSCljTsw6Zj8tZIkTW7zhHSVf8A1BhX+Gj6DfAyoVZ pfDdyPUzzXQXN/6VeSgn224NZeVw X-Google-Smtp-Source: APXvYqw9SX4W7EvyqqAFFT+C2VIhMaG+XvENi3bo974PJnBDoe2cdG1PJYQR79j3AkzryteNA7j/vQ== X-Received: by 2002:a62:1144:: with SMTP id z65mr19082497pfi.187.1553439984315; Sun, 24 Mar 2019 08:06:24 -0700 (PDT) Original-Received: from lylat ([2604:3d09:e380:2255:962f:b96:2aaf:c3d5]) by smtp.gmail.com with ESMTPSA id e22sm17533291pfi.126.2019.03.24.08.06.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 24 Mar 2019 08:06:23 -0700 (PDT) In-Reply-To: <922F9B91-2E9E-45F6-BB96-66CAE5E9FB81@gnu.org> (Eli Zaretskii's message of "Sun, 24 Mar 2019 07:39:46 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::531 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:234681 Archived-At: Eli Zaretskii 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 with: 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 macros.