comparison lisp/international/mule-cmds.el @ 59743:baaed9bd0e12

(standard-display-european-internal): Don't fiddle with latin-1 non-break space any more since it's now special cased in the C code. Don't "do&undo" setting for 160 (especially, don't undo incorrectly).
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 27 Jan 2005 14:47:33 +0000
parents 6fae65f635c3
children 9c28fead9bf2 3dcba0bc766b f8a7a9ba3d08
comparison
equal deleted inserted replaced
59742:6b85c2bb9368 59743:baaed9bd0e12
1 ;;; mule-cmds.el --- commands for mulitilingual environment -*-coding: iso-2022-7bit -*- 1 ;;; mule-cmds.el --- commands for mulitilingual environment -*-coding: iso-2022-7bit -*-
2 2
3 ;; Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 3 ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
4 ;; Copyright (C) 1995, 2003 Electrotechnical Laboratory, JAPAN. 4 ;; Copyright (C) 1995, 2003 Electrotechnical Laboratory, JAPAN.
5 ;; Licensed to the Free Software Foundation. 5 ;; Licensed to the Free Software Foundation.
6 6
7 ;; Keywords: mule, multilingual 7 ;; Keywords: mule, multilingual
8 8
1863 ;; Unibyte Emacs on MS-DOS wants to display all 8-bit characters with 1863 ;; Unibyte Emacs on MS-DOS wants to display all 8-bit characters with
1864 ;; the native font, and codes 160 and 146 stand for something very 1864 ;; the native font, and codes 160 and 146 stand for something very
1865 ;; different there. 1865 ;; different there.
1866 (or (and (eq window-system 'pc) (not default-enable-multibyte-characters)) 1866 (or (and (eq window-system 'pc) (not default-enable-multibyte-characters))
1867 (progn 1867 (progn
1868 ;; Make non-line-break space display as a plain space. 1868 ;; Most X fonts used to do the wrong thing for latin-1 code 160.
1869 ;; Most X fonts do the wrong thing for code 160. 1869 (unless (and (eq window-system 'x)
1870 (aset standard-display-table 160 [32]) 1870 ;; XFree86 4 has fixed the fonts.
1871 ;; With luck, non-Latin-1 fonts are more recent and so don't 1871 (string= "The XFree86 Project, Inc" (x-server-vendor))
1872 ;; have this bug. 1872 (> (aref (number-to-string (nth 2 (x-server-version))) 0)
1873 (aset standard-display-table (make-char 'latin-iso8859-1 160) [32]) 1873 ?3))
1874 ;; Make non-line-break space display as a plain space.
1875 (aset standard-display-table 160 [32]))
1874 ;; Most Windows programs send out apostrophes as \222. Most X fonts 1876 ;; Most Windows programs send out apostrophes as \222. Most X fonts
1875 ;; don't contain a character at that position. Map it to the ASCII 1877 ;; don't contain a character at that position. Map it to the ASCII
1876 ;; apostrophe. [This is actually RIGHT SINGLE QUOTATION MARK, 1878 ;; apostrophe. [This is actually RIGHT SINGLE QUOTATION MARK,
1877 ;; U+2019, normally from the windows-1252 character set. XFree 4 1879 ;; U+2019, normally from the windows-1252 character set. XFree 4
1878 ;; fonts probably have the appropriate glyph at this position, 1880 ;; fonts probably have the appropriate glyph at this position,
1879 ;; so they could use standard-display-8bit. It's better to use a 1881 ;; so they could use standard-display-8bit. It's better to use a
1880 ;; proper windows-1252 coding system. --fx] 1882 ;; proper windows-1252 coding system. --fx]
1881 (aset standard-display-table 146 [39]) 1883 (aset standard-display-table 146 [39]))))
1882 ;; XFree86 4 has changed most of the fonts from their designed
1883 ;; versions such that `' no longer appears as balanced quotes.
1884 ;; Assume it has iso10646 fonts installed, so we can display
1885 ;; balanced quotes.
1886 (when (and (eq window-system 'x)
1887 (string= "The XFree86 Project, Inc" (x-server-vendor))
1888 (> (aref (number-to-string (nth 2 (x-server-version))) 0)
1889 ?3))
1890 ;; We suppress these setting for the moment because the
1891 ;; above assumption is wrong.
1892 ;; (aset standard-display-table ?' [?$,1ry(B])
1893 ;; (aset standard-display-table ?` [?$,1rx(B])
1894 ;; The fonts don't have the relevant bug.
1895 (aset standard-display-table 160 nil)
1896 (aset standard-display-table (make-char 'latin-iso8859-1 160)
1897 nil)))))
1898 1884
1899 (defun set-language-environment-coding-systems (language-name 1885 (defun set-language-environment-coding-systems (language-name
1900 &optional eol-type) 1886 &optional eol-type)
1901 "Do various coding system setups for language environment LANGUAGE-NAME. 1887 "Do various coding system setups for language environment LANGUAGE-NAME.
1902 1888
1953 (error "No documentation for the specified language")) 1939 (error "No documentation for the specified language"))
1954 (if (symbolp language-name) 1940 (if (symbolp language-name)
1955 (setq language-name (symbol-name language-name))) 1941 (setq language-name (symbol-name language-name)))
1956 (dolist (feature (get-language-info language-name 'features)) 1942 (dolist (feature (get-language-info language-name 'features))
1957 (require feature)) 1943 (require feature))
1958 (let ((doc (get-language-info language-name 'documentation)) 1944 (let ((doc (get-language-info language-name 'documentation)))
1959 pos)
1960 (help-setup-xref (list #'describe-language-environment language-name) 1945 (help-setup-xref (list #'describe-language-environment language-name)
1961 (interactive-p)) 1946 (interactive-p))
1962 (with-output-to-temp-buffer (help-buffer) 1947 (with-output-to-temp-buffer (help-buffer)
1963 (save-excursion 1948 (save-excursion
1964 (set-buffer standard-output) 1949 (set-buffer standard-output)