aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/character.c26
-rw-r--r--src/character.h2
-rw-r--r--src/lread.c7
-rw-r--r--src/print.c3
4 files changed, 1 insertions, 37 deletions
diff --git a/src/character.c b/src/character.c
index 708eb2f7024..55ad49005a0 100644
--- a/src/character.c
+++ b/src/character.c
@@ -1056,32 +1056,6 @@ blankp (int c)
1056 return XFIXNUM (category) == UNICODE_CATEGORY_Zs; /* separator, space */ 1056 return XFIXNUM (category) == UNICODE_CATEGORY_Zs; /* separator, space */
1057} 1057}
1058 1058
1059
1060/* Return true for characters that would read as symbol characters,
1061 but graphically may be confused with some kind of punctuation. We
1062 require an escaping backslash, when such characters begin a
1063 symbol. */
1064bool
1065confusable_symbol_character_p (int ch)
1066{
1067 switch (ch)
1068 {
1069 case 0x2018: /* LEFT SINGLE QUOTATION MARK */
1070 case 0x2019: /* RIGHT SINGLE QUOTATION MARK */
1071 case 0x201B: /* SINGLE HIGH-REVERSED-9 QUOTATION MARK */
1072 case 0x201C: /* LEFT DOUBLE QUOTATION MARK */
1073 case 0x201D: /* RIGHT DOUBLE QUOTATION MARK */
1074 case 0x201F: /* DOUBLE HIGH-REVERSED-9 QUOTATION MARK */
1075 case 0x301E: /* DOUBLE PRIME QUOTATION MARK */
1076 case 0xFF02: /* FULLWIDTH QUOTATION MARK */
1077 case 0xFF07: /* FULLWIDTH APOSTROPHE */
1078 return true;
1079
1080 default:
1081 return false;
1082 }
1083}
1084
1085/* hexdigit[C] is one greater than C's numeric value if C is a 1059/* hexdigit[C] is one greater than C's numeric value if C is a
1086 hexadecimal digit, zero otherwise. */ 1060 hexadecimal digit, zero otherwise. */
1087signed char const hexdigit[UCHAR_MAX + 1] = 1061signed char const hexdigit[UCHAR_MAX + 1] =
diff --git a/src/character.h b/src/character.h
index 230fc6eab59..3642a540448 100644
--- a/src/character.h
+++ b/src/character.h
@@ -684,8 +684,6 @@ extern bool graphicp (int);
684extern bool printablep (int); 684extern bool printablep (int);
685extern bool blankp (int); 685extern bool blankp (int);
686 686
687extern bool confusable_symbol_character_p (int ch);
688
689/* Return a translation table of id number ID. */ 687/* Return a translation table of id number ID. */
690#define GET_TRANSLATION_TABLE(id) \ 688#define GET_TRANSLATION_TABLE(id) \
691 (XCDR (XVECTOR (Vtranslation_table_vector)->contents[(id)])) 689 (XCDR (XVECTOR (Vtranslation_table_vector)->contents[(id)]))
diff --git a/src/lread.c b/src/lread.c
index 4ea62029727..e5a9c93c55e 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -3571,13 +3571,6 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
3571 if (! NILP (result) && len == nbytes) 3571 if (! NILP (result) && len == nbytes)
3572 return unbind_to (count, result); 3572 return unbind_to (count, result);
3573 } 3573 }
3574 if (!quoted && multibyte)
3575 {
3576 int ch = STRING_CHAR ((unsigned char *) read_buffer);
3577 if (confusable_symbol_character_p (ch))
3578 xsignal2 (Qinvalid_read_syntax, build_string ("strange quote"),
3579 CALLN (Fstring, make_fixnum (ch)));
3580 }
3581 { 3574 {
3582 Lisp_Object result; 3575 Lisp_Object result;
3583 ptrdiff_t nchars 3576 ptrdiff_t nchars
diff --git a/src/print.c b/src/print.c
index a2c199c14ad..7105c5dbb92 100644
--- a/src/print.c
+++ b/src/print.c
@@ -2035,8 +2035,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
2035 || c == ',' || c == '.' || c == '`' 2035 || c == ',' || c == '.' || c == '`'
2036 || c == '[' || c == ']' || c == '?' || c <= 040 2036 || c == '[' || c == ']' || c == '?' || c <= 040
2037 || c == NO_BREAK_SPACE 2037 || c == NO_BREAK_SPACE
2038 || confusing 2038 || confusing)
2039 || (i == 1 && confusable_symbol_character_p (c)))
2040 { 2039 {
2041 printchar ('\\', printcharfun); 2040 printchar ('\\', printcharfun);
2042 confusing = false; 2041 confusing = false;