]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove read_string_literal purify doc string hack
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 4 Aug 2022 05:23:59 +0000 (07:23 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 4 Aug 2022 05:23:59 +0000 (07:23 +0200)
* src/lread.c (read_string_literal): Since we're now
byte-compiling the loaddefs files (so doc strings come from the
.elc files), remove the hack that make this return 0 when the
string starts with "\\n".

src/lread.c

index 0b46a2e4ee548fa465853b65ac5ce3e709d3f0bd..b7d8d9eeca529055ba54950c5234cb28acab8e9e 100644 (file)
@@ -3056,7 +3056,6 @@ read_string_literal (char stackbuf[VLA_ELEMS (stackbufsize)],
   /* True if we saw an escape sequence specifying
      a single-byte character.  */
   bool force_singlebyte = false;
-  bool cancel = false;
   ptrdiff_t nchars = 0;
 
   int ch;
@@ -3085,8 +3084,6 @@ read_string_literal (char stackbuf[VLA_ELEMS (stackbufsize)],
            case ' ':
            case '\n':
              /* `\SPC' and `\LF' generate no characters at all.  */
-             if (p == read_buffer)
-               cancel = true;
              continue;
            default:
              UNREAD (ch);
@@ -3152,15 +3149,6 @@ read_string_literal (char stackbuf[VLA_ELEMS (stackbufsize)],
   if (ch < 0)
     end_of_file_error ();
 
-  /* If purifying, and string starts with \ newline,
-     return zero instead.  This is for doc strings
-     that we are really going to find in etc/DOC.nn.nn.  */
-  if (!NILP (Vpurify_flag) && NILP (Vdoc_file_name) && cancel)
-    {
-      unbind_to (count, Qnil);
-      return make_fixnum (0);
-    }
-
   if (!force_multibyte && force_singlebyte)
     {
       /* READ_BUFFER contains raw 8-bit bytes and no multibyte