Commit 66ae3cff authored by Stefan Monnier's avatar Stefan Monnier

* src/lread.c (intern_1): Make sure we'd find the symbol we add

Fixes: debbugs:20334

* src/xfaces.c (resolve_face_name): Don't use `intern' with Lisp_Strings.
parent cc4705f6
......@@ -3778,8 +3778,11 @@ intern_1 (const char *str, ptrdiff_t len)
Lisp_Object obarray = check_obarray (Vobarray);
Lisp_Object tem = oblookup (obarray, str, len, len);
return SYMBOLP (tem) ? tem : intern_driver (make_string (str, len),
obarray, tem);
return (SYMBOLP (tem) ? tem
/* The above `oblookup' was done on the basis of nchars==nbytes, so
the string has to be unibyte. */
: intern_driver (make_unibyte_string (str, len),
obarray, tem));
}
Lisp_Object
......
......@@ -1822,7 +1822,7 @@ resolve_face_name (Lisp_Object face_name, bool signal_p)
Lisp_Object tortoise, hare;
if (STRINGP (face_name))
face_name = intern (SSDATA (face_name));
face_name = Fintern (face_name, Qnil);
if (NILP (face_name) || !SYMBOLP (face_name))
return face_name;
......
......@@ -5,6 +5,15 @@ ($)
return 0;
}
my $hash = {
foo => 'bar',
format => 'some',
};
sub some_code {
print "will not indent :(";
};
use v5.14;
my $str= <<END;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment