unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: 33164@debbugs.gnu.org
Subject: bug#33164: 26.1; Compiled function information in *Help*
Date: Sun, 28 Oct 2018 09:27:45 -0400	[thread overview]
Message-ID: <877ei2jj5a.fsf@gmail.com> (raw)
In-Reply-To: <cb085600-e3fa-4827-9f6a-876976721add@default> (Drew Adams's message of "Fri, 26 Oct 2018 08:05:39 -0700 (PDT)")

retitle 33164 Compiled function value information in *Help*
quit

Drew Adams <drew.adams@oracle.com> writes:

> C-h v region-extract-function tells me:
>
> region-extract-function is a variable defined in 'simple.el'.
> Its value is #f(compiled-function (method) #<bytecode 0x1001ae2e9>)
> ...
>
> There is a link to `simple.el'.  And the #<bytecode...> is also a link,
> to the disassembled byte-code.

> But it is less helpful than what we had back in Emacs 23, which printed
> the name or the lambda expression of the function that is the value of
> the variable.  Examples:
>
>  comment-line-break-function is a variable defined in `simple.el'.
>  Its value is comment-indent-new-line

This one is still the same in newer Emacs versions.

> But just showing the byte code, even disassembled, is not so helpful.
> What if a user wants to go to the function definition, to use it as a
> model for defining a new value for the variable or just to study it?

Similarly, C-h v float-pi tells me

    float-pi is a variable defined in ‘float-sup.el’.
    Its value is 3.141592653589793

It doesn't show me (* 4 (atan 1)) for study.

> But maybe I'm missing something?  Is there currently some way to get to
> the source code defining the function that is the variable value?

In this case, the link to `simple.el' takes you there because it's the
default value.  But in general, no, that information is not saved
anywhere.

The easiest fix is to say we should never assign anonymous functions to
variables (there have already been a couple of cases where some
anonymous function values were given names), so then they would all show
a symbol like comment-line-break-function.






  reply	other threads:[~2018-10-28 13:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-26 15:05 bug#33164: 26.1; Compiled function information in *Help* Drew Adams
2018-10-28 13:27 ` Noam Postavsky [this message]
2018-10-28 14:17   ` Drew Adams
2021-06-23 14:05   ` bug#33164: Compiled function value " Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877ei2jj5a.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=33164@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).