all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#27117: 26.0.50; Setting cl-print-compiled to `static' has problems if print-circle isn't set
@ 2017-05-28 14:56 npostavs
  2017-05-28 18:33 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: npostavs @ 2017-05-28 14:56 UTC (permalink / raw)
  To: 27117; +Cc: Stefan Monnier

Perhap this is just expected behaviour when `print-circle' is nil, but
using 'prin1' instead of 'cl-prin1' doesn't have this problem.

The setup is a bit convoluted (adapted from #15789) because I don't
understand what circumstances are needed to produce a bytecode function
with loops.

Evaluate the following from 'emacs -Q':

    (require 'tmm)

    (defvar frame-with-circle nil)

    (defadvice tmm-add-prompt (before emacspeak pre act comp)
      "Speaks the list of completions we have available."
      (setq frame-with-circle (backtrace-frame 4)))

    (tmm-menubar) ; then C-g

    (let ((cl-print-compiled 'static))
      (cl-prin1 (nth 1 frame-with-circle) (current-buffer)))

Prints into the buffer

   #f(compiled-function () #<bytecode> [tmm-add-prompt
    (#f(compiled-function () #<bytecode> [tmm-add-prompt
    (#f(compiled-function () #<bytecode> [tmm-add-prompt
    (#f(compiled-function () #<bytecode> [tmm-add-prompt
    ...

and 

   Debugger entered--Lisp error: (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")

Replacing 'cl-prin1' with 'prin1' gives:

    #[0 "\302\303\301\242\"\210\300 \207" [tmm-add-prompt (#0) remove-hook minibuffer-setup-hook] 3]





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

end of thread, other threads:[~2017-05-31 11:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-28 14:56 bug#27117: 26.0.50; Setting cl-print-compiled to `static' has problems if print-circle isn't set npostavs
2017-05-28 18:33 ` Stefan Monnier
2017-05-28 21:13   ` npostavs
2017-05-31 11:48     ` npostavs

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.