From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Why does show_help_echo call substitute_command_keys? Date: Fri, 21 Jul 2017 19:54:32 +0200 Message-ID: <03d54b61-0635-587d-6b22-7a5b96f7ad69@gmail.com> References: <4f821efa-1448-8ba0-d164-abeff36180d4@gmail.com> <6364429e-0696-4835-bed8-458a6095067f@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1500659772 31317 195.159.176.226 (21 Jul 2017 17:56:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 21 Jul 2017 17:56:12 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Cc: Emacs developers To: Yuri Khan , Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 21 19:56:08 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYc9k-0007eU-1q for ged-emacs-devel@m.gmane.org; Fri, 21 Jul 2017 19:56:04 +0200 Original-Received: from localhost ([::1]:44281 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYc9p-0007mc-KR for ged-emacs-devel@m.gmane.org; Fri, 21 Jul 2017 13:56:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYc8M-0006so-JN for emacs-devel@gnu.org; Fri, 21 Jul 2017 13:54:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYc8J-0001Zf-HC for emacs-devel@gnu.org; Fri, 21 Jul 2017 13:54:38 -0400 Original-Received: from mail-wr0-x22e.google.com ([2a00:1450:400c:c0c::22e]:33437) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dYc8J-0001ZV-A2 for emacs-devel@gnu.org; Fri, 21 Jul 2017 13:54:35 -0400 Original-Received: by mail-wr0-x22e.google.com with SMTP id v105so55006955wrb.0 for ; Fri, 21 Jul 2017 10:54:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=EVEJqU0QIq6LxlYjVLCfCml/tE9/LUeRqClVCyGB6YE=; b=S3hXol7ZH1mgnnXyNQCX1FW2EHe3wbvu/r5jtpezxBrChdKWHiDehHqRZPqBkscWnK bC0FdxLJxWJxgjIYEXlYxnkBocrlv6sa+zJHLfgMJZIQdfTm2YtiL7nEk4/YoCo2jEcz u+dUvPGf+e/h/1y6hDIwYBLB9w7Fmo5HPhjhSoW0eSzxzBqVvTFbJMeZv0QmHShBVy1M pkJ2NHDl/NZx18DZ3LdTv8cK8jkrImRpr+Moc03kz2FYmQmYQ706+CUbPRpLRt/dVkSs QfCRzNVGClEyEXvEc5dCdZgwunSsD5/MRjajUfjGdrytJy2L/Hs3gS6icWLEdSnn7YeR ++gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=EVEJqU0QIq6LxlYjVLCfCml/tE9/LUeRqClVCyGB6YE=; b=V2OD/KQb4VLM19Ea/OiiUcCUHG4SBxfbxljv/7A9/0qAr2gr8GO79fDuuetbathqrc wSUYxrS1oFsKgT1ahpe8F/C/vV9vPkhMqKWRqLlfX8Yp5CM76Byn60+Mf52VHGTuzk4T S7LBqCZ0KRQx2E8r4beaLI/w1VLPvWydZVF2NT03LGqZIWMO/S1jDXMvIZ7262moKseQ sciR6B7yCNhIz0k8v4QfEwdtTdtxVuVqg1MO1FnvTOdi+M1gxo4KowU+HAxfKNA4Qg5Y QIpla0M89D1SHF8YY19XJVYr2mqOKlO7szVYySbL6WmClm0CYzKFltbC/fbkCyB9bir7 Mebw== X-Gm-Message-State: AIVw110UxBC8EouywMvaClhdoNO/UdI35XroX2+rIMmiTZWcYS1mAliZ pSwgXC58+pIuEjL7XwA= X-Received: by 10.223.142.164 with SMTP id q33mr11140588wrb.13.1500659673995; Fri, 21 Jul 2017 10:54:33 -0700 (PDT) Original-Received: from [128.93.70.6] ([128.93.70.6]) by smtp.gmail.com with ESMTPSA id g18sm15738315wrg.69.2017.07.21.10.54.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Jul 2017 10:54:33 -0700 (PDT) In-Reply-To: Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22e 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:216926 Archived-At: On 2017-07-21 19:49, Yuri Khan wrote: > On Fri, Jul 21, 2017 at 9:54 PM, Drew Adams wrote: >>> Because the help-echo property is the Emacs API to tooltips, and >>> tooltips are expected to be able to display keyboard equivalents >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>> to clicking the thing that is pointed? >> >> A tooltip should just display whatever text it is handed, >> with no fiddling with or elaboration of that text. If you >> need such fiddling, whether by ``substitute-command-keys' >> or `format' or something else, do it beforehand. > > Actually, client code that wishes to display a command key in a > tooltip can set the help-echo property to a function. So, hardcoding > the substitute-command-keys call in show_help_echo does not seem > necessary after all. Indeed, that's what we do in Flycheck (using a function). If most menu bar entries are created by easy-menu-define, maybe it wouldn't even break much to change show_help_echo to not substitute command keys (easy-menu-define would add the command key substitution instead). Clément.