emacs-diffs
[Top][All Lists]
Advanced

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

emacs-28 9156e10927: (define-char-code-property): Workaround for bug#529


From: Stefan Monnier
Subject: emacs-28 9156e10927: (define-char-code-property): Workaround for bug#52945
Date: Sun, 2 Jan 2022 02:26:04 -0500 (EST)

branch: emacs-28
commit 9156e109270b837b0b4f5740c305531754e72cf6
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    (define-char-code-property): Workaround for bug#52945
    
    * lisp/international/mule-cmds.el (define-char-code-property): Ignore
    requests to re-setup lazy loading after the char-table is already loaded.
---
 lisp/international/mule-cmds.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 7fd1430c03..28be35d65d 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2936,8 +2936,14 @@ See also the documentation of `get-char-code-property' 
and
     (or (stringp table)
        (error "Not a char-table nor a file name: %s" table)))
   (if (stringp table) (setq table (purecopy table)))
-  (setf (alist-get name char-code-property-alist) table)
-  (put name 'char-code-property-documentation (purecopy docstring)))
+  (if (and (stringp table)
+           (char-table-p (alist-get name char-code-property-alist)))
+      ;; The table is already setup and we're apparently trying to
+      ;; undo that, probably because `charprop.el' is being re-loaded.
+      ;; Just skip it, in order to work around a recursive load (bug#52945).
+      nil
+    (setf (alist-get name char-code-property-alist) table)
+    (put name 'char-code-property-documentation (purecopy docstring))))
 
 (defvar char-code-property-table
   (make-char-table 'char-code-property-table)



reply via email to

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