From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Daniel_Mart=C3=ADn?= Newsgroups: gmane.emacs.help Subject: Re: `M-.' can't skip to the corresponding DEFUN from within the Apropos buffer. Date: Mon, 05 Jul 2021 23:26:28 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23550"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin) Cc: help-gnu-emacs To: Hongyi Zhao Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 05 23:27:30 2021 Return-path: Envelope-to: geh-help-gnu-emacs@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 1m0W7m-0005yn-9C for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Jul 2021 23:27:30 +0200 Original-Received: from localhost ([::1]:38848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0W7l-00037Y-5l for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Jul 2021 17:27:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0W7Q-00037P-Bn for help-gnu-emacs@gnu.org; Mon, 05 Jul 2021 17:27:08 -0400 Original-Received: from sonic304-23.consmr.mail.ir2.yahoo.com ([77.238.179.148]:45427) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0W7N-0000CD-Lr for help-gnu-emacs@gnu.org; Mon, 05 Jul 2021 17:27:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1625520421; bh=1+/bij3Wx/w9CM47qV/20JXUm7t+GfQIr2mrfH7netE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=Za2MvW3mGCID476UVEg2t4uo8r/seBMH73ne4fxfZ/mmCse7BlQluBlZ22lq/4VYBEni40dA6+IQ2fULtEMetvVRXBjuZaT7Gvf88TBCtUgt1dNwIMlhFfWYWn+hGcSzQgra9WYuFThjYT97FVYJmB0uUTHupo4lsXvhnoqAYz9SqT/JORFtvWIk7LfmAk4/zFnCTXYsUVOCvMVD9wkKSM46+JCuLgdl7VPN7i1FEcSKmUYyNKbMrr1hb9MacOGGY//OHrOxqbK6yb4r8B38e8MPzrOXmn4fMZf2ADK0/LFdKNB0AXWvn5We9q5RJMbsltr+kMh7jPOZck9mYAeW8Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1625520421; bh=wetahpDlh81Gbm7wYgeHxxH9EgDN2ATckNxnIJ7JGNe=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=b8W4+O++0IKKN6hW6JJCMobwpoKtNw/TUCrRE4jTx1uapZzY0VJFpLr0F3fX134hQ+iUrSQjicQcdSMAD/iYdRT9qSZIE8yPErNNHjxSbBtLPRwQYz2dnt7+zFAe2oDx/cutpn454W95LgGp0r8kAMaIpB/nTWV71cJtG+TLxD5BworabMP2ijuPpKzLG9U+RtRdmvaOgdHVe34JwR3Dz8D/a7gGcHfAQEMlfbfQa2XEotx9T18JeeOTLP2InxcAZOoA8rZZGAebiRzu4s4lsfG3rfWal4xiPcYpau1W7UIKkkhcmoM2F4X+4hs8brXJwov747xLmAsPLEKVrCk5Ag== X-YMail-OSG: Fly8LeIVM1ljhVQ0UK60ONlvTRU8X2pTIwskWcyjgiDva66ptXhw_Yyz4BETG2u er7.w.uUPLVAlm2NIjiHD0H.4JLXqWBSFwREvmQ16wIBlHQiybWBu3V.A5pUuo8polg81Nbxrofi dMKX1NYjO_P9kJLHVZ9z7SeyxfDGCNEoUtc5KQUWFeCpspAeqIuEJbn2n9bj0c7x3aimgtrsvRRc eNebp382RisP1nDosyiCceRPc4o949CdTh9gypV4ftkt.KxO01zTcUMGUdBfGqXAG_JM6GM1MbRJ AFHEjm8Harzg7faTiy8dQNChK4GmKbV33x6mGFbrbrRx6oaJUCd0qStK5CSsWp9fSCOjGY3uQ0Z. Y4OecP1L_abCQwJ3k6Xpkiped1epI8Tfedyiw6zJamELxPruDvoCiiVOAJ_Yf_DWT.aERxShFgi1 alCJAbNblahaCW_VGYspWVHGGIfObOrhvfgQhNLGrb_77nQ90NxalWoFpcmWb65c.vkNRtp3SNWe x4K1nIj3VVi_q8e_.oSpGeMP5xTpmG8naEkCM7nX6Qxw6qvWBK4A6fuuWrDlNQgBxRBHuFf8JEoK w5ILHj51Gb9SH8OC5Yyk8mT1CZi7eMMIPMfE4MSm4nCnxaaGduZCwxNXTXZyptgxhwIorowW8Xko Trzzza0g4CMDllLftIvAI5CWjvRb6C3jlI4KuLVNBnI9ptyvVp7LhYXJ4q2Gri4Toe6XsG.ML1VJ l3Dihge8fPqIzZmPe1iHsu4bgWHX_kLDZXY4kYsT_E4VEnAgWm4rYt._X1_C5hRHIas3VVAOBP6J AGZ_ML_aE_kUDhlLbRYSciHekemMVrAy7mqwrz0lpR X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ir2.yahoo.com with HTTP; Mon, 5 Jul 2021 21:27:01 +0000 Original-Received: by kubenode521.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 4911c737470f2f424bf1032fa5e65e1e; Mon, 05 Jul 2021 21:26:55 +0000 (UTC) In-Reply-To: (Hongyi Zhao's message of "Mon, 5 Jul 2021 10:44:22 +0800") X-Mailer: WebService/1.1.18469 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=77.238.179.148; envelope-from=mardani29@yahoo.es; helo=sonic304-23.consmr.mail.ir2.yahoo.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:131506 Archived-At: Hongyi Zhao writes: >> >> - Create a buffer-local binding for xref-backend-functions in Apropos >> buffers where you prepend elisp--xref-backend to the list. >> > > I've read some relevant document [1], but still can't figure out how > to set this feature in my initialization file. > > [1] https://www.gnu.org/software/emacs/manual/html_node/elisp/Creating-Buffer_002dLocal.html > You could add something like (add-hook 'apropos-mode-hook (lambda () (add-hook 'xref-backend-functions #'elisp--xref-backend nil t))) apropos-mode-hook is the hook that is invoked when apropos-mode is turned on. Notice that I pass t as the fourth argument to add-hook; that says to modify the buffer-local value of xref-backend-functions, not the global value. As the code is evaluated when apropos-mode is turned on, the current buffer will be the Apropos buffer and the change will only have an effect on that buffer.