all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#64535: 30.0.50; Spurious newlines in `prin1` output
@ 2023-07-08 19:19 Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-07-09  5:09 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-07-08 19:19 UTC (permalink / raw)
  To: 64535

Package: Emacs
Version: 30.0.50


`prin1` never inserts newlines unless they're within strings (and that
can be controlled with `print-escape-newlines`), right?  Right?

Nope: it does insert newlines inside char-table when reaching the 3rd
level of subtables.  This was done to work around the long lines problem
in redisplay (bug#2866), but it's far from the only case where `prin1`
can emit a long line, and we've significantly improved our handling of
long lines.

Can we get rid of this quirk now, please?


        Stefan


diff --git a/src/print.c b/src/print.c
index 5c95aeb9a20..aae998692fb 100644
--- a/src/print.c
+++ b/src/print.c
@@ -2544,11 +2544,6 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
 	  }
 	case PVEC_SUB_CHAR_TABLE:
 	  {
-	    /* Make each lowest sub_char_table start a new line.
-	       Otherwise we'll make a line extremely long, which
-	       results in slow redisplay.  */
-	    if (XSUB_CHAR_TABLE (obj)->depth == 3)
-	      printchar ('\n', printcharfun);
 	    print_c_string ("#^^[", printcharfun);
 	    int n = sprintf (buf, "%d %d",
 			     XSUB_CHAR_TABLE (obj)->depth,






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

end of thread, other threads:[~2023-08-10 16:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-08 19:19 bug#64535: 30.0.50; Spurious newlines in `prin1` output Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-09  5:09 ` Eli Zaretskii
2023-07-13 23:11   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-14 13:38     ` Eli Zaretskii
2023-07-14 14:46       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-15  7:29         ` Eli Zaretskii
2023-07-15 15:20           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-10 16:00         ` Gregory Heytings

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.