From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Menu bar items structure Date: Thu, 17 Nov 2022 19:17:54 +0800 Message-ID: <87fsehg78d.fsf@yahoo.com> References: <87pmdmkdrh.fsf@elite.giraud> <83iljednq6.fsf@gnu.org> <87sfiiezv0.fsf@yahoo.com> <87cz9lkino.fsf@elite.giraud> <87o7t5gajj.fsf@yahoo.com> <878rk9ki3e.fsf@elite.giraud> <87k03tg7ch.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15027"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Manuel Giraud Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 17 12:18:38 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ovcuk-0003lR-0P for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Nov 2022 12:18:38 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovcuL-0006h9-Nq; Thu, 17 Nov 2022 06:18:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovcuF-0006av-Sp for emacs-devel@gnu.org; Thu, 17 Nov 2022 06:18:07 -0500 Original-Received: from sonic315-20.consmr.mail.ne1.yahoo.com ([66.163.190.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ovcuE-0004AL-Et for emacs-devel@gnu.org; Thu, 17 Nov 2022 06:18:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1668683884; bh=14pue8l5yeh4rqih2ArsjKSsLt4mVzv9Z/GuZRsmj3c=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=G8ehV1Mo2ovgnbFKN4jUIvWZDfOImy//F9kvji0/85SCCPlpJlZFcjwZ4xy78mQmdjPDNZbV5COOYzh0vc5bN3AOkyJ1eISbhh4YWXHG21636ARIo23L5XxZEHp6YGFIDo/S8h4B1BROZ7ALpgNMVqzN0meXDwTMeZVnm9Nc/Mfwjak58T27GnCqMa8xOGwnLNgTbhI7iaBx+hx4C+Ez6ZQuC4QTeohaKYQyRK98PGapqs7kY3SAdk+BBRxxAOSWckqsL7tZ7kh9nGb12afe+G6Pffq3YHAiSOeghI3hga/iSil8aZXmvklzayxdjWDiYKVCqCYxFYy0CaW5nYD+1w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1668683884; bh=sdyCvu/QOYq1mfJO893Iniysf9+S6EUvlltUxhCcru+=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Y1zAF2BbkMaol3MQ+laE76luqP/GNnV5DH2wI5gWOER8z7Dtn+RC+qX2k4xzmzCNluZr4in3GSTfhVLfej4JiMSAkFkxJbIEroznAdOf9CaEVl8vfQMJSUXaP17z3flTpESJ9vrqApj+5qweoqMbQNnueqphax1PP6p2Dv7UlFxWSoVo3JJ++R2N4nOTZhUyFhxmTTZa6Yiv3S/4iTN+WvutgjTPRfIUCuBo3cDaesAI4206CzdTjEAKcj6wmYvf1/CDAmyKX3flP0eODohhqZznefCTY5iTK76V4FRh14xbjnBH0CzRyHo/VGg9DsqAG23Pu/9g/vywdceUCES4mQ== X-YMail-OSG: cSFawJgVM1mEZl5t8U64wvb0iGANs8OPvHEJFje3B8WCOFXKiFa7SBrJ0d2zSmG XaWu.seLmMu8wjTSpYbrjValzOS5l2ORwXOnt9U7jCZBJnnDgC61BbQgh9HBMB05cy5b8xF9a0FQ RgE6XFu0VjTCGfJXX6An5Ln1SB4s_YMRYcguI5RXJiYKfNCW0kwRXDT82jTZr_FK75BHTo02ux1w NqSPIz30N1UIl3rU_KbvPc7oUtn4oJxaWlVboe3v3oAOCa3LRTPksYYnsR19ouD8GxpTyi56jaKP 2o6IFMN8abinRazZgTDoumY.4at_Il89su8ePWclBjp_E5WOrBqUa8ItUx1fNIbqpv_5UGcdolRP _PBJ4YFGIRacBretoJlNWMB8vl2eFNgdbP6XZQGRIjVMKoosWAF4_UvwBrME3xgx8Gkp07Go5WLM trvQaHo0lqTIG5JEieHt7IvYqD_rjKsJr6_FC07XTnl0tRj6dKyuBGL8XZqFhfMCcjWf7SPL2vX_ KauyiPohduEHO72D1XrIjvPvstApGsDQ81w40LjvhVwN8w8UDh1mfFwZERXKoHSUwGoFeol2lhRD cZvDD38i3AUnZDOoLTtsIsYZSG0J0VNjucUp4Ag5QN1vRPxMy8BdYGN_TF3M.W1xz.UCX5c6bCwY 9gUf9DBy5bJXy41__K8qccwQdR5Wt3bx3jne11tJx99DGivJ0rdJmfZLSrvlDByfO8dFcD7l7s5t Mr_ZCBvzCEwz.aStEq1KCJR4Zo.QJtr3LrkgiiLlfNtdelVurPHtGZ7OPU3HpuG91RPH1nBKtGS5 qYdMI1VjQ6tBj7gnDUC9qSJ5EZ8lTQ_75TPPhi2_3P X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.ne1.yahoo.com with HTTP; Thu, 17 Nov 2022 11:18:04 +0000 Original-Received: by hermes--production-sg3-6c8895b545-26lc9 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 9836780af87ee2e4f3d5325799bedfa5; Thu, 17 Nov 2022 11:17:58 +0000 (UTC) In-Reply-To: <87k03tg7ch.fsf@yahoo.com> (Po Lu's message of "Thu, 17 Nov 2022 19:15:26 +0800") X-Mailer: WebService/1.1.20863 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.190.146; envelope-from=luangruo@yahoo.com; helo=sonic315-20.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300041 Archived-At: Po Lu writes: > Yes. But at the same time, I think we might as well fix the code to > stop assuming that each character in the menu bar item string > corresponds to a single glyph, so the changes that have to be done are > actually much more subtle. Scratch the last part. I think that problem is already solved by this piece of display_menu_bar: /* Remember where item was displayed. */ ASET (items, i + 3, make_fixnum (it.hpos)); /* Display the item, pad with one space. */ if (it.current_x < it.last_visible_x) display_string (NULL, string, Qnil, 0, 0, &it, SCHARS (string) + 1, 0, 0, STRING_MULTIBYTE (string));