aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-11-27 00:21:19 -0800
committerGlenn Morris2013-11-27 00:21:19 -0800
commit20372d0c8914f0aafd6cd52a69356e93fbb09d09 (patch)
tree7505900204bb221e6be98f42037ba6b3431cc13d
parent72fdd47303c46def1d91f202c177b7ff9a489441 (diff)
downloademacs-20372d0c8914f0aafd6cd52a69356e93fbb09d09.tar.gz
emacs-20372d0c8914f0aafd6cd52a69356e93fbb09d09.zip
Make bootstrap without generated uni-*.el files possible again
* 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.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/composite.el18
-rw-r--r--lisp/international/characters.el70
-rw-r--r--lisp/loadup.el8
4 files changed, 59 insertions, 43 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ba680e2dc0a..50f587d1126 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,11 @@
12013-11-27 Glenn Morris <rgm@gnu.org> 12013-11-27 Glenn Morris <rgm@gnu.org>
2 2
3 Make bootstrap without generated uni-*.el files possible again.
4 * loadup.el: Update command-line-args checking for unidata-gen.
5 Add vc to load-path to allow loading vc-bzr when writing uni-*.el.
6 * composite.el, international/characters.el:
7 Handle unicode tables being undefined.
8
3 Move ja-dic, quail, leim-list.el from ../leim to a leim subdirectory. 9 Move ja-dic, quail, leim-list.el from ../leim to a leim subdirectory.
4 * Makefile.in (setwins_for_subdirs): Skip leim/ directory. 10 * Makefile.in (setwins_for_subdirs): Skip leim/ directory.
5 (compile-main): Depend on leim rule. 11 (compile-main): Depend on leim rule.
diff --git a/lisp/composite.el b/lisp/composite.el
index f2f4437cadb..7cf35c2af68 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -1,5 +1,7 @@
1;;; composite.el --- support character composition 1;;; composite.el --- support character composition
2 2
3;; Copyright (C) 2001-2013 Free Software Foundation, Inc.
4
3;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 5;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
4;; 2008, 2009, 2010, 2011 6;; 2008, 2009, 2010, 2011
5;; National Institute of Advanced Industrial Science and Technology (AIST) 7;; National Institute of Advanced Industrial Science and Technology (AIST)
@@ -669,13 +671,15 @@ All non-spacing characters have this function in
669 (setq i (1+ i)))) 671 (setq i (1+ i))))
670 gstring)))))) 672 gstring))))))
671 673
672(let ((elt `([,(purecopy "\\c.\\c^+") 1 compose-gstring-for-graphic] 674;; Allow for bootstrapping without uni-*.el.
673 [nil 0 compose-gstring-for-graphic]))) 675(when unicode-category-table
674 (map-char-table 676 (let ((elt `([,(purecopy "\\c.\\c^+") 1 compose-gstring-for-graphic]
675 #'(lambda (key val) 677 [nil 0 compose-gstring-for-graphic])))
676 (if (memq val '(Mn Mc Me)) 678 (map-char-table
677 (set-char-table-range composition-function-table key elt))) 679 #'(lambda (key val)
678 unicode-category-table)) 680 (if (memq val '(Mn Mc Me))
681 (set-char-table-range composition-function-table key elt)))
682 unicode-category-table)))
679 683
680(defun compose-gstring-for-terminal (gstring) 684(defun compose-gstring-for-terminal (gstring)
681 "Compose glyph-string GSTRING for terminal display. 685 "Compose glyph-string GSTRING for terminal display.
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index 2195308737c..7632650b7f7 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -484,13 +484,16 @@ with L, LRE, or LRO Unicode bidi character type.")
484 484
485;; Bidi categories 485;; Bidi categories
486 486
487(map-char-table (lambda (key val) 487;; If bootstrapping without generated uni-*.el files, table not defined.
488 (cond 488(let ((table (unicode-property-table-internal 'bidi-class)))
489 ((memq val '(R AL RLO RLE)) 489 (when table
490 (modify-category-entry key ?R)) 490 (map-char-table (lambda (key val)
491 ((memq val '(L LRE LRO)) 491 (cond
492 (modify-category-entry key ?L)))) 492 ((memq val '(R AL RLO RLE))
493 (unicode-property-table-internal 'bidi-class)) 493 (modify-category-entry key ?R))
494 ((memq val '(L LRE LRO))
495 (modify-category-entry key ?L))))
496 table)))
494 497
495;; Latin 498;; Latin
496 499
@@ -1332,15 +1335,15 @@ Setup char-width-table appropriate for non-CJK language environment."
1332 1335
1333;;; Setting unicode-category-table. 1336;;; Setting unicode-category-table.
1334 1337
1335(setq unicode-category-table 1338(when (setq unicode-category-table
1336 (unicode-property-table-internal 'general-category)) 1339 (unicode-property-table-internal 'general-category))
1337(map-char-table #'(lambda (key val) 1340 (map-char-table #'(lambda (key val)
1338 (if (and val 1341 (if (and val
1339 (or (and (/= (aref (symbol-name val) 0) ?M) 1342 (or (and (/= (aref (symbol-name val) 0) ?M)
1340 (/= (aref (symbol-name val) 0) ?C)) 1343 (/= (aref (symbol-name val) 0) ?C))
1341 (eq val 'Zs))) 1344 (eq val 'Zs)))
1342 (modify-category-entry key ?.))) 1345 (modify-category-entry key ?.)))
1343 unicode-category-table) 1346 unicode-category-table))
1344 1347
1345(optimize-char-table (standard-category-table)) 1348(optimize-char-table (standard-category-table))
1346 1349
@@ -1426,23 +1429,24 @@ This function updates the char-table `glyphless-char-display'."
1426 (glyphless-set-char-table-range glyphless-char-display 1429 (glyphless-set-char-table-range glyphless-char-display
1427 #x80 #x9F method)) 1430 #x80 #x9F method))
1428 ((eq target 'format-control) 1431 ((eq target 'format-control)
1429 (map-char-table 1432 (when unicode-category-table
1430 #'(lambda (char category) 1433 (map-char-table
1431 (if (eq category 'Cf) 1434 #'(lambda (char category)
1432 (let ((this-method method) 1435 (if (eq category 'Cf)
1433 from to) 1436 (let ((this-method method)
1434 (if (consp char) 1437 from to)
1435 (setq from (car char) to (cdr char)) 1438 (if (consp char)
1436 (setq from char to char)) 1439 (setq from (car char) to (cdr char))
1437 (while (<= from to) 1440 (setq from char to char))
1438 (when (/= from #xAD) 1441 (while (<= from to)
1439 (if (eq method 'acronym) 1442 (when (/= from #xAD)
1440 (setq this-method 1443 (if (eq method 'acronym)
1441 (aref char-acronym-table from))) 1444 (setq this-method
1442 (set-char-table-range glyphless-char-display 1445 (aref char-acronym-table from)))
1443 from this-method)) 1446 (set-char-table-range glyphless-char-display
1444 (setq from (1+ from)))))) 1447 from this-method))
1445 unicode-category-table)) 1448 (setq from (1+ from))))))
1449 unicode-category-table)))
1446 ((eq target 'no-font) 1450 ((eq target 'no-font)
1447 (set-char-table-extra-slot glyphless-char-display 0 method)) 1451 (set-char-table-extra-slot glyphless-char-display 0 method))
1448 (t 1452 (t
diff --git a/lisp/loadup.el b/lisp/loadup.el
index dc284803c57..d31f02a39ad 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -51,8 +51,9 @@
51;; in deciding whether to modify it. 51;; in deciding whether to modify it.
52(if (or (equal (nth 3 command-line-args) "bootstrap") 52(if (or (equal (nth 3 command-line-args) "bootstrap")
53 (equal (nth 4 command-line-args) "bootstrap") 53 (equal (nth 4 command-line-args) "bootstrap")
54 (equal (nth 3 command-line-args) "unidata-gen.el") 54 ;; FIXME this is irritatingly fragile.
55 (equal (nth 4 command-line-args) "unidata-gen-files") 55 (equal (nth 4 command-line-args) "unidata-gen.el")
56 (equal (nth 7 command-line-args) "unidata-gen-files")
56 ;; In case CANNOT_DUMP. 57 ;; In case CANNOT_DUMP.
57 (string-match "src/bootstrap-emacs" (nth 0 command-line-args))) 58 (string-match "src/bootstrap-emacs" (nth 0 command-line-args)))
58 (let ((dir (car load-path))) 59 (let ((dir (car load-path)))
@@ -62,7 +63,8 @@
62 (expand-file-name "emacs-lisp" dir) 63 (expand-file-name "emacs-lisp" dir)
63 (expand-file-name "language" dir) 64 (expand-file-name "language" dir)
64 (expand-file-name "international" dir) 65 (expand-file-name "international" dir)
65 (expand-file-name "textmodes" dir))))) 66 (expand-file-name "textmodes" dir)
67 (expand-file-name "vc" dir)))))
66 68
67(if (eq t purify-flag) 69(if (eq t purify-flag)
68 ;; Hash consing saved around 11% of pure space in my tests. 70 ;; Hash consing saved around 11% of pure space in my tests.