all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Problem with file-local variables in uni-special-lowercase.el
Date: Sat, 01 Jan 2022 17:52:16 -0500	[thread overview]
Message-ID: <jwvmtkf14em.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <838rvzfhlg.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 01 Jan 2022 20:15:07 +0200")

>> >> 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)




  parent reply	other threads:[~2022-01-01 22:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-01  9:00 Problem with file-local variables in uni-special-lowercase.el Eli Zaretskii
2022-01-01 11:05 ` Eli Zaretskii
2022-01-01 17:57   ` Stefan Monnier
2022-01-01 18:15     ` Eli Zaretskii
2022-01-01 18:49       ` Eli Zaretskii
2022-01-01 22:52       ` Stefan Monnier [this message]
2022-01-02  5:13         ` Stefan Monnier
2022-01-02  6:56         ` Eli Zaretskii
2022-01-01 13:07 ` Po Lu
2022-01-01 15:09   ` Philipp Stephani
2022-01-02  0:10     ` Po Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvmtkf14em.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.