emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115256: Make bootstrap without generated uni-*.el f


From: Glenn Morris
Subject: [Emacs-diffs] trunk r115256: Make bootstrap without generated uni-*.el files possible again
Date: Wed, 27 Nov 2013 08:21:40 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115256
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2013-11-27 00:21:19 -0800
message:
  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.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/composite.el              
composite.el-20091113204419-o5vbwnq5f7feedwu-1730
  lisp/international/characters.el 
characters.el-20091113204419-o5vbwnq5f7feedwu-1037
  lisp/loadup.el                 loadup.el-20091113204419-o5vbwnq5f7feedwu-49
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-11-27 06:28:18 +0000
+++ b/lisp/ChangeLog    2013-11-27 08:21:19 +0000
@@ -1,5 +1,11 @@
 2013-11-27  Glenn Morris  <address@hidden>
 
+       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.

=== modified file 'lisp/composite.el'
--- a/lisp/composite.el 2013-11-05 07:44:14 +0000
+++ b/lisp/composite.el 2013-11-27 08:21:19 +0000
@@ -1,5 +1,7 @@
 ;;; 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)
@@ -669,13 +671,15 @@
              (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.

=== modified file 'lisp/international/characters.el'
--- a/lisp/international/characters.el  2013-11-05 09:54:43 +0000
+++ b/lisp/international/characters.el  2013-11-27 08:21:19 +0000
@@ -484,13 +484,16 @@
 
 ;; 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
 
@@ -1332,15 +1335,15 @@
 
 ;;; 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))
 
@@ -1426,23 +1429,24 @@
             (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

=== modified file 'lisp/loadup.el'
--- a/lisp/loadup.el    2013-11-27 06:15:06 +0000
+++ b/lisp/loadup.el    2013-11-27 08:21:19 +0000
@@ -51,8 +51,9 @@
 ;; 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)))
@@ -62,7 +63,8 @@
                            (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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]