emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question on set-window-margins


From: Eli Zaretskii
Subject: Re: Question on set-window-margins
Date: Fri, 05 Jan 2024 10:01:28 +0200

> From: Yuan Fu <casouri@gmail.com>
> Date: Thu, 4 Jan 2024 16:25:26 -0800
> Cc: John Yates <john@yates-sheets.org>,
>  "Nicolas P. Rougier (inria)" <nicolas.rougier@inria.fr>,
>  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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]