unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#50839: 28.0.50; Odd things in comp-ctxt doc string
@ 2021-09-27  6:58 Lars Ingebrigtsen
  2021-09-27  7:00 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-27  6:58 UTC (permalink / raw)
  To: 50839; +Cc: Andrea Corallo


I saw that compiling with native-comp warned about a too-long doc
string, but looking at comp-ctxt-byte-func-to-func-h, it's not too long:

  (byte-func-to-func-h (make-hash-table :test #'equal) :type hash-table
                     :documentation "byte-function -> comp-func.
Needed to replace immediate byte-compiled lambdas with the compiled reference.")

But looking at the actual help buffer, I get the stuff below.

It looks like bits of the doc strings have been replaced with...  odd
things?  "lambdas" is now "lamcomp-func.dbdas".  And also the
"byte-funCL-X.ction" thing.  I haven't debugged any further; perhaps
it's obvious to someone what's going on.  (I've added Andrea to the CCs.)

comp-ctxt-byte-func-to-func-h is a native compiled Lisp function in
‘comp.el’.

(comp-ctxt-byte-func-to-func-h CL-X)

Access slot "byte-func-to-func-h" of ‘comp-ctxt’ struct

byte-funCL-X.ction ->

Needed to replace immediate byte-compiled lamcomp-func.bdas with the compiled reference.

  This function has a compiler macro ‘comp-ctxt-byte-func-to-func-h--cmacro’.
  This function does not change global state, including the match data.



In GNU Emacs 28.0.50 (build 23, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
 of 2021-09-26 built on elva
Repository revision: 43ae8c828d853382bbc2a27b9e14b9fff6ba18b6
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#50839: 28.0.50; Odd things in comp-ctxt doc string
  2021-09-27  6:58 bug#50839: 28.0.50; Odd things in comp-ctxt doc string Lars Ingebrigtsen
@ 2021-09-27  7:00 ` Lars Ingebrigtsen
  2021-09-27  9:51   ` Stefan Kangas
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-27  7:00 UTC (permalink / raw)
  To: 50839; +Cc: Stefan Kangas, Andrea Corallo

Lars Ingebrigtsen <larsi@gnus.org> writes:

> But looking at the actual help buffer, I get the stuff below.
>
> It looks like bits of the doc strings have been replaced with...  odd
> things?  "lambdas" is now "lamcomp-func.dbdas".  And also the
> "byte-funCL-X.ction" thing.  I haven't debugged any further; perhaps
> it's obvious to someone what's going on.  (I've added Andrea to the CCs.)

Oh, and this started happening after Stefan K's long-doc-string warning
enablement in lambda, so perhaps it's related to that (or perhaps that
just makes the problem more obvious).  (So I've added him to the CCs, too.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#50839: 28.0.50; Odd things in comp-ctxt doc string
  2021-09-27  7:00 ` Lars Ingebrigtsen
@ 2021-09-27  9:51   ` Stefan Kangas
  2021-09-28  5:21     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Kangas @ 2021-09-27  9:51 UTC (permalink / raw)
  To: Lars Ingebrigtsen, 50839; +Cc: Andrea Corallo

tags 50839 fixed
close 50839 28.1
thanks

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> But looking at the actual help buffer, I get the stuff below.
>>
>> It looks like bits of the doc strings have been replaced with...  odd
>> things?  "lambdas" is now "lamcomp-func.dbdas".  And also the
>> "byte-funCL-X.ction" thing.  I haven't debugged any further; perhaps
>> it's obvious to someone what's going on.  (I've added Andrea to the CCs.)
>
> Oh, and this started happening after Stefan K's long-doc-string warning
> enablement in lambda, so perhaps it's related to that (or perhaps that
> just makes the problem more obvious).  (So I've added him to the CCs, too.)

Thanks, this is now fixed on master in commit 3d2d7e8ea2.

This was caused by trying to fill an entire paragraph as if it were a
single line.  Here, I really wish we could use `cl-assert' in subr.el,
to do something like this in `internal--format-docstring-line':

    (cl-assert (not (string-match "\n" string)))

Do we have anything like that, or do we just do something like this
instead?

    (and (string-match "\n" string)
         (error "Contains newline: %s" string))

Maybe this is okay as this should pretty much only be called from
macros?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#50839: 28.0.50; Odd things in comp-ctxt doc string
  2021-09-27  9:51   ` Stefan Kangas
@ 2021-09-28  5:21     ` Lars Ingebrigtsen
  2021-09-28 12:28       ` Stefan Kangas
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-28  5:21 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 50839, Andrea Corallo

Stefan Kangas <stefan@marxist.se> writes:

> Do we have anything like that, or do we just do something like this
> instead?
>
>     (and (string-match "\n" string)
>          (error "Contains newline: %s" string))
>
> Maybe this is okay as this should pretty much only be called from
> macros?

I think that should be OK.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#50839: 28.0.50; Odd things in comp-ctxt doc string
  2021-09-28  5:21     ` Lars Ingebrigtsen
@ 2021-09-28 12:28       ` Stefan Kangas
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Kangas @ 2021-09-28 12:28 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 50839, Andrea Corallo

Lars Ingebrigtsen <larsi@gnus.org> writes:

>>     (and (string-match "\n" string)
>>          (error "Contains newline: %s" string))
>>
>> Maybe this is okay as this should pretty much only be called from
>> macros?
>
> I think that should be OK.

Thanks, I've now made that change on master.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-28 12:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27  6:58 bug#50839: 28.0.50; Odd things in comp-ctxt doc string Lars Ingebrigtsen
2021-09-27  7:00 ` Lars Ingebrigtsen
2021-09-27  9:51   ` Stefan Kangas
2021-09-28  5:21     ` Lars Ingebrigtsen
2021-09-28 12:28       ` Stefan Kangas

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).