aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1998-03-03 01:29:16 +0000
committerKenichi Handa1998-03-03 01:29:16 +0000
commit2cef5737de1aa5a1c3c66c59a22fb32fba6c391a (patch)
tree1d830526381276cb609e624f5df53e15455a8392 /src
parent93fdf93bc151e6679ec0d000ad040ec1daf70c61 (diff)
downloademacs-2cef5737de1aa5a1c3c66c59a22fb32fba6c391a.tar.gz
emacs-2cef5737de1aa5a1c3c66c59a22fb32fba6c391a.zip
(DEFAULT_NONASCII_INSERT_OFFSET): Macro definition is
moved to charset.h. (concat): Use unibyte_char_to_multibyte.
Diffstat (limited to 'src')
-rw-r--r--src/fns.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/fns.c b/src/fns.c
index 6bdcff83e21..1299f3d2a8e 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -40,8 +40,6 @@ Boston, MA 02111-1307, USA. */
40#define NULL (void *)0 40#define NULL (void *)0
41#endif 41#endif
42 42
43#define DEFAULT_NONASCII_INSERT_OFFSET 0x800
44
45/* Nonzero enables use of dialog boxes for questions 43/* Nonzero enables use of dialog boxes for questions
46 asked by mouse commands. */ 44 asked by mouse commands. */
47int use_dialog_box; 45int use_dialog_box;
@@ -573,9 +571,9 @@ concat (nargs, args, target_type, last_special)
573 break; 571 break;
574 else if (STRINGP (this)) 572 else if (STRINGP (this))
575 { 573 {
574 int c;
576 if (STRING_MULTIBYTE (this)) 575 if (STRING_MULTIBYTE (this))
577 { 576 {
578 int c;
579 FETCH_STRING_CHAR_ADVANCE (c, this, 577 FETCH_STRING_CHAR_ADVANCE (c, this,
580 thisindex, 578 thisindex,
581 thisindex_byte); 579 thisindex_byte);
@@ -583,21 +581,11 @@ concat (nargs, args, target_type, last_special)
583 } 581 }
584 else 582 else
585 { 583 {
586 unsigned char c;
587 XSETFASTINT (elt, XSTRING (this)->data[thisindex++]); 584 XSETFASTINT (elt, XSTRING (this)->data[thisindex++]);
588 if (some_multibyte && XINT (elt) >= 0200 585 if (some_multibyte && XINT (elt) >= 0200
589 && XINT (elt) < 0400) 586 && XINT (elt) < 0400)
590 { 587 {
591 c = XINT (elt); 588 c = unibyte_char_to_multibyte (XINT (elt));
592
593 if (! NILP (Vnonascii_translate_table))
594 c = XINT (Faref (Vnonascii_translate_table,
595 make_number (c)));
596 else if (nonascii_insert_offset > 0)
597 c += nonascii_insert_offset;
598 else
599 c += DEFAULT_NONASCII_INSERT_OFFSET;
600
601 XSETINT (elt, c); 589 XSETINT (elt, c);
602 } 590 }
603 } 591 }
@@ -793,7 +781,7 @@ string_byte_to_char (string, byte_index)
793} 781}
794 782
795/* Convert STRING to a multibyte string. 783/* Convert STRING to a multibyte string.
796 Single-byte characters 0200 through 0377 are converted 784 Single-byte characters 0240 through 0377 are converted
797 by adding nonascii_insert_offset to each. */ 785 by adding nonascii_insert_offset to each. */
798 786
799Lisp_Object 787Lisp_Object