(read1): Redo the previous change with checking
authorKenichi Handa <handa@m17n.org>
Wed, 5 Dec 2007 05:07:51 +0000 (05:07 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 5 Dec 2007 05:07:51 +0000 (05:07 +0000)
Vpurify_flag.

src/lread.c

index 2df624d..6674f84 100644 (file)
@@ -2992,19 +2992,18 @@ read1 (readcharfun, pch, first_in_list)
              }
          }
        {
-#if 0
-         /* Fixme: The fullowing code is currently commented out
-            because it results in strange error in C-h f.  For the
-            moment, I don't have a time to track down the
-            problem.  -- Handa */
-         Lisp_Object name = make_specified_string (read_buffer, -1,
-                                                   p - read_buffer,
-                                                   multibyte);
-         Lisp_Object result = (uninterned_symbol ? Fmake_symbol (name)
-                               : Fintern (name, Qnil));
-#endif
-         Lisp_Object result = uninterned_symbol ? make_symbol (read_buffer)
-           : intern (read_buffer);
+         Lisp_Object name, result;
+         EMACS_INT nbytes = p - read_buffer;
+         EMACS_INT nchars
+           = (multibyte ? multibyte_chars_in_text (read_buffer, nbytes)
+              : nbytes);
+
+         if (uninterned_symbol && ! NILP (Vpurify_flag))
+           name = make_pure_string (read_buffer, nchars, nbytes, multibyte);
+         else
+           name = make_specified_string (read_buffer, nchars, nbytes,multibyte);
+         result = (uninterned_symbol ? Fmake_symbol (name)
+                   : Fintern (name, Qnil));
 
          if (EQ (Vread_with_symbol_positions, Qt)
              || EQ (Vread_with_symbol_positions, readcharfun))