aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Innes1999-05-02 10:51:03 +0000
committerAndrew Innes1999-05-02 10:51:03 +0000
commit7bbe686fb2e71c4abe965a4abc694d3a114402c8 (patch)
tree4850968afca61650f7811c7e67731017b75a6180
parenta5a7d30fe9b1bcb6648f7a15e8a26ff4199a546b (diff)
downloademacs-7bbe686fb2e71c4abe965a4abc694d3a114402c8.tar.gz
emacs-7bbe686fb2e71c4abe965a4abc694d3a114402c8.zip
(display_text_line): Convert unibyte char to multibyte
if unibyte_display_via_language_environment is set. (unibyte_display_via_language_environment): Variable moved from xfns.c and elsewhere. (syms_of_xfns): Set up Lisp var.
-rw-r--r--src/xdisp.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index da6ec5e280b..57feb78a1bf 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -112,6 +112,9 @@ char *previous_echo_glyphs;
112/* Nonzero means truncate lines in all windows less wide than the frame */ 112/* Nonzero means truncate lines in all windows less wide than the frame */
113int truncate_partial_width_windows; 113int truncate_partial_width_windows;
114 114
115/* A flag to control how to display unibyte 8-bit character. */
116int unibyte_display_via_language_environment;
117
115/* Nonzero means we have more than one non-minibuffer-only frame. 118/* Nonzero means we have more than one non-minibuffer-only frame.
116 Not guaranteed to be accurate except while parsing frame-title-format. */ 119 Not guaranteed to be accurate except while parsing frame-title-format. */
117int multiple_frames; 120int multiple_frames;
@@ -3825,6 +3828,12 @@ display_text_line (w, start, start_byte, vpos, hpos, taboffset, ovstr_done)
3825 by octal form. */ 3828 by octal form. */
3826 int remaining_bytes = len; 3829 int remaining_bytes = len;
3827 3830
3831 if (unibyte_display_via_language_environment
3832 && SINGLE_BYTE_CHAR_P (c)
3833 && (c >= 0240
3834 || (c >= 0200 && !NILP (Vnonascii_translation_table))))
3835 c = unibyte_char_to_multibyte (c);
3836
3828 if (c >= 0400 && CHAR_VALID_P (c, 0)) 3837 if (c >= 0400 && CHAR_VALID_P (c, 0))
3829 { 3838 {
3830 /* C is a multibyte character. */ 3839 /* C is a multibyte character. */
@@ -5597,6 +5606,15 @@ is not valid when these functions are called.");
5597 "*Number of characters of overlap when scrolling a one-line window.\n\ 5606 "*Number of characters of overlap when scrolling a one-line window.\n\
5598This commonly affects the minibuffer window, hence the name of the variable."); 5607This commonly affects the minibuffer window, hence the name of the variable.");
5599 minibuffer_scroll_overlap = 20; 5608 minibuffer_scroll_overlap = 20;
5609
5610 DEFVAR_BOOL ("unibyte-display-via-language-environment",
5611 &unibyte_display_via_language_environment,
5612 "*Non-nil means display unibyte text according to language environment.\n\
5613Specifically this means that unibyte non-ASCII characters\n\
5614are displayed by converting them to the equivalent multibyte characters\n\
5615according to the current language environment. As a result, they are\n\
5616displayed according to the current fontset.");
5617 unibyte_display_via_language_environment = 0;
5600} 5618}
5601 5619
5602/* initialize the window system */ 5620/* initialize the window system */