From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Question on set-window-margins Date: Fri, 05 Jan 2024 10:01:28 +0200 Message-ID: <838r54w6nb.fsf@gnu.org> References: <83il4bzgmk.fsf@gnu.org> <83h6jvyu9p.fsf@gnu.org> <5FC2FDA6-CB7F-4285-958E-EC8595FC66AE@gmail.com> <834jfuzhg1.fsf@gnu.org> <83r0iyxsym.fsf@gnu.org> <83ttntw9a6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17091"; mail-complaints-to="usenet@ciao.gmane.io" Cc: john@yates-sheets.org, nicolas.rougier@inria.fr, emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 05 09:02:26 2024 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 1rLf9u-0004HZ-KT for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Jan 2024 09:02:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLf9C-0000r7-Pd; Fri, 05 Jan 2024 03:01:42 -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 1rLf9B-0000qf-HT for emacs-devel@gnu.org; Fri, 05 Jan 2024 03:01:41 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLf99-00044x-Vv; Fri, 05 Jan 2024 03:01:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=cYhwUQ7NiC5bnqxqfgDDx/UELI8aQFTNesHEra4nu2Q=; b=kylAbRzHrQASa8NbLYWy izL62XLrWyJjQ/GPRrXec6p0t4Jqy8LErHs8zDJvTwtizP7L3gxQ//6CYMl5bcTjxIWRt1FY/AiuS vVTetFzBi7gV7wNcSzoMDw3vON4G14RgP28wfrZijBwN/nIZ7I6go1vNSEvGJ9ufYRBJQXV/kW9Dx Q1fT0pXXlckqCYLuoCjyxWpHRzaJ9d9LiOLlcX+ltcZHvO5AAltjqVjEZ04QEO6jl/qSgpP7BKXgJ CIeztybGe1yUmKQ+TeVW3oazn+qtpFE3AHbmTSwqx1j6AyZsFd4i1Ng62MPS7Eq5Yo3WWLl4mGO9Y q+jaTFZSJNksmg==; In-Reply-To: (message from Yuan Fu on Thu, 4 Jan 2024 16:25:26 -0800) 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:314560 Archived-At: > From: Yuan Fu > Date: Thu, 4 Jan 2024 16:25:26 -0800 > Cc: John Yates , > "Nicolas P. Rougier (inria)" , > emacs-devel@gnu.org > > Helpful.el automatically inserts a button that links to the manual entry if it can find the symbol in the manual. It’s probably not perfect, but I frequently found it to be, well, helpful ;-) > > The test function is defined as > > (defun helpful--in-manual-p (sym) > "Return non-nil if SYM is in an Info manual." > (let ((completions > (cl-letf (((symbol-function #'message) > (lambda (_format-string &rest _args)))) > (info-lookup->completions 'symbol 'emacs-lisp-mode)))) > (-when-let (buf (get-buffer " temp-info-look")) > (kill-buffer buf)) > (or (assoc sym completions) > (assoc-string sym completions)))) Why not use the same code as in help-goto-info?