* lisp/loadup.el: Update command-line-args checking for unidata-gen.
Add vc to load-path to allow loading vc-bzr when writing uni-*.el.
* lisp/composite.el, lisp/international/characters.el:
Handle unicode tables being undefined.
* lisp/composite.el: Add (rough) FSF copyright years.
2013-11-27 Glenn Morris <rgm@gnu.org>
+ Make bootstrap without generated uni-*.el files possible again.
+ * loadup.el: Update command-line-args checking for unidata-gen.
+ Add vc to load-path to allow loading vc-bzr when writing uni-*.el.
+ * composite.el, international/characters.el:
+ Handle unicode tables being undefined.
+
Move ja-dic, quail, leim-list.el from ../leim to a leim subdirectory.
* Makefile.in (setwins_for_subdirs): Skip leim/ directory.
(compile-main): Depend on leim rule.
;;; composite.el --- support character composition
+;; Copyright (C) 2001-2013 Free Software Foundation, Inc.
+
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
;; 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
(setq i (1+ i))))
gstring))))))
-(let ((elt `([,(purecopy "\\c.\\c^+") 1 compose-gstring-for-graphic]
- [nil 0 compose-gstring-for-graphic])))
- (map-char-table
- #'(lambda (key val)
- (if (memq val '(Mn Mc Me))
- (set-char-table-range composition-function-table key elt)))
- unicode-category-table))
+;; Allow for bootstrapping without uni-*.el.
+(when unicode-category-table
+ (let ((elt `([,(purecopy "\\c.\\c^+") 1 compose-gstring-for-graphic]
+ [nil 0 compose-gstring-for-graphic])))
+ (map-char-table
+ #'(lambda (key val)
+ (if (memq val '(Mn Mc Me))
+ (set-char-table-range composition-function-table key elt)))
+ unicode-category-table)))
(defun compose-gstring-for-terminal (gstring)
"Compose glyph-string GSTRING for terminal display.
;; Bidi categories
-(map-char-table (lambda (key val)
- (cond
- ((memq val '(R AL RLO RLE))
- (modify-category-entry key ?R))
- ((memq val '(L LRE LRO))
- (modify-category-entry key ?L))))
- (unicode-property-table-internal 'bidi-class))
+;; If bootstrapping without generated uni-*.el files, table not defined.
+(let ((table (unicode-property-table-internal 'bidi-class)))
+ (when table
+ (map-char-table (lambda (key val)
+ (cond
+ ((memq val '(R AL RLO RLE))
+ (modify-category-entry key ?R))
+ ((memq val '(L LRE LRO))
+ (modify-category-entry key ?L))))
+ table)))
;; Latin
\f
;;; Setting unicode-category-table.
-(setq unicode-category-table
- (unicode-property-table-internal 'general-category))
-(map-char-table #'(lambda (key val)
- (if (and val
- (or (and (/= (aref (symbol-name val) 0) ?M)
- (/= (aref (symbol-name val) 0) ?C))
- (eq val 'Zs)))
- (modify-category-entry key ?.)))
- unicode-category-table)
+(when (setq unicode-category-table
+ (unicode-property-table-internal 'general-category))
+ (map-char-table #'(lambda (key val)
+ (if (and val
+ (or (and (/= (aref (symbol-name val) 0) ?M)
+ (/= (aref (symbol-name val) 0) ?C))
+ (eq val 'Zs)))
+ (modify-category-entry key ?.)))
+ unicode-category-table))
(optimize-char-table (standard-category-table))
(glyphless-set-char-table-range glyphless-char-display
#x80 #x9F method))
((eq target 'format-control)
- (map-char-table
- #'(lambda (char category)
- (if (eq category 'Cf)
- (let ((this-method method)
- from to)
- (if (consp char)
- (setq from (car char) to (cdr char))
- (setq from char to char))
- (while (<= from to)
- (when (/= from #xAD)
- (if (eq method 'acronym)
- (setq this-method
- (aref char-acronym-table from)))
- (set-char-table-range glyphless-char-display
- from this-method))
- (setq from (1+ from))))))
- unicode-category-table))
+ (when unicode-category-table
+ (map-char-table
+ #'(lambda (char category)
+ (if (eq category 'Cf)
+ (let ((this-method method)
+ from to)
+ (if (consp char)
+ (setq from (car char) to (cdr char))
+ (setq from char to char))
+ (while (<= from to)
+ (when (/= from #xAD)
+ (if (eq method 'acronym)
+ (setq this-method
+ (aref char-acronym-table from)))
+ (set-char-table-range glyphless-char-display
+ from this-method))
+ (setq from (1+ from))))))
+ unicode-category-table)))
((eq target 'no-font)
(set-char-table-extra-slot glyphless-char-display 0 method))
(t
;; in deciding whether to modify it.
(if (or (equal (nth 3 command-line-args) "bootstrap")
(equal (nth 4 command-line-args) "bootstrap")
- (equal (nth 3 command-line-args) "unidata-gen.el")
- (equal (nth 4 command-line-args) "unidata-gen-files")
+ ;; FIXME this is irritatingly fragile.
+ (equal (nth 4 command-line-args) "unidata-gen.el")
+ (equal (nth 7 command-line-args) "unidata-gen-files")
;; In case CANNOT_DUMP.
(string-match "src/bootstrap-emacs" (nth 0 command-line-args)))
(let ((dir (car load-path)))
(expand-file-name "emacs-lisp" dir)
(expand-file-name "language" dir)
(expand-file-name "international" dir)
- (expand-file-name "textmodes" dir)))))
+ (expand-file-name "textmodes" dir)
+ (expand-file-name "vc" dir)))))
(if (eq t purify-flag)
;; Hash consing saved around 11% of pure space in my tests.