emacs-devel
[Top][All Lists]
Advanced

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

Re: Problem with file-local variables in uni-special-lowercase.el


From: Stefan Monnier
Subject: Re: Problem with file-local variables in uni-special-lowercase.el
Date: Sat, 01 Jan 2022 17:52:16 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>> >> There's some strange problem with this file: when building Emacs after
>> >> it is updated, byte-compilation of various Lisp files fails with error
>> >> message like this:
>> >
>> > FWIW, it seems to start happening as soon as charprop.el is
>> > regenerated, whenever the new charprop.el is reloaded by the
>> > byte-compilation process.

[ Apparently `uni-special-lowercase.el` and its friends are preloaded
  in the dump (even though they don't appear in `loadup.el`).  ]

I suspect this problem is newly introduced by the symbol-shorthands
code, which apparently uses just enough more of the `hack-local-variables`
machinery to trigger it.

The patch below seems to circumvent the problem.


        Stefan


diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index de1331e12a9..8b61a88f136 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2958,8 +2958,14 @@ define-char-code-property
     (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.
+      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]