Mercurial > emacs
view admin/charsets/cp51932.awk @ 107595:69c12db7031d
Retrospective commit from 2009-10-05.
Continue working on paragraph base direction.
Support per-buffer default paragraph direction.
buffer.h (struct buffer): New member paragraph_direction.
buffer.c (init_buffer_once): Initialize it.
(syms_of_buffer): Declare Lisp variables
default-paragraph-direction and paragraph-direction.
dispextern.h (struct it): New member paragraph_embedding.
xdisp.c (init_iterator): Initialize it from the buffer's value
of paragraph-direction.
<Qright_to_left, Qleft_to_right>: New variables.
(syms_of_xdisp): Initialize and staticpro them.
(set_iterator_to_next, next_element_from_buffer): Use the value of
paragraph_embedding to determine the paragraph direction.
bidi.c (bidi_line_init): Fix second argument to
bidi_set_sor_type.
(bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
(bidi_get_next_char_visually): Record the last character of the
separator in separator_limit, not the character after that.
(bidi_find_paragraph_start): Accept character and byte positions
instead of the whole iterator stricture. All callers changed.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 01 Jan 2010 06:22:52 -0500 |
parents | a2e7830524d4 |
children | 1d1d5d9bd884 |
line wrap: on
line source
# cp51932.awk -- Generate a translation table for CP51932. # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 # National Institute of Advanced Industrial Science and Technology (AIST) # Registration Number H13PRO009 # This file is part of GNU Emacs. # GNU Emacs is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # GNU Emacs is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. # Commentary: # Genereate a translation table for CP51932 (EUC-JP of MicroSoft Version). # It maps invalid JISX0208 code points used by CP51932 to Unicode. # 4th field of the input has these meanings: # 0: JISX0208 characters. # 1: NEC special characters. # 2: IBM extension characters. # 3: NEC selection of IBM extension characters. # Among them, 1 and 3 are the target characters. 2 should have # already been mapped to 1 or 3. BEGIN { print ";;; cp51932.el -- translation table for CP51932. -*- no-byte-compile: t -*-"; print ";;; Automatically genrated from CP932-2BYTE.map"; print "(let ((map"; printf " '(;JISEXT<->UNICODE"; } /# [13]/ { printf "\n (#x%s . #x%s)", $5 ,substr($2, 3, 4); } END { print ")))"; print " (mapc #'(lambda (x)"; print " (setcar x (decode-char 'japanese-jisx0208 (car x))))"; print " map)"; print " (define-translation-table 'cp51932-decode map)"; print " (mapc #'(lambda (x)"; print " (let ((tmp (car x)))"; print " (setcar x (cdr x)) (setcdr x tmp)))"; print " map)"; print " (define-translation-table 'cp51932-encode map))"; print ""; print ";; arch-tag: d21c06e5-a548-4dda-8802-c2922ff19da3"; } # arch-tag: bbae996b-2d1c-4e85-bb55-ac30146d7504