#1052164 xemacs21: should not try to byte-compile the files from /usr/share/emacs/site-lisp

#1052164#5
Date:
2023-09-18 14:20:00 UTC
From:
To:
Files in /usr/share/emacs/site-lisp are not necessarily compatible
with XEmacs. So XEmacs should not try to byte-compile them, or
at least, package installation should no fail because of that.

For instance, mmm-mode is not compatible with xemacs21, so that
its maintainer had to add "Conflicts: xemacs21". This is not
satisfactory: a multi-user machine may have the packages emacs-gtk
and xemacs21 installed because there are users who use GNU Emacs
and other users who use XEmacs. In such a case, with the current
situation, it is not possible to install mmm-mode for GNU Emacs
users because of the conflict. This is really bad.

FYI, here are the errors one obtains when installing mmm-mode
if "Conflicts: xemacs21" is removed and xemacs21 is installed:

[...]
Setting up mmm-mode (0.5.9-2) ...
Install emacsen-common for emacs
emacsen-common: Handling install of emacsen flavor emacs
Install emacsen-common for xemacs21
emacsen-common: Handling install of emacsen flavor xemacs21
Loading /usr/share/emacsen-common/debian-startup...
Loading 00debian...
Compiling /usr/share/xemacs21/site-lisp/debian-startup.el...
Wrote /usr/share/xemacs21/site-lisp/debian-startup.elc
Done
Install mmm-mode for emacs
install/mmm-mode: Handling install of emacsen flavor emacs
install/mmm-mode: byte-compiling for emacs
Install mmm-mode for xemacs21
install/mmm-mode: Handling install of emacsen flavor xemacs21
install/mmm-mode: byte-compiling for xemacs21
Compiling /usr/share/xemacs21/site-lisp/mmm-mode/cl-lib.el...
While compiling toplevel forms in file /usr/share/xemacs21/site-lisp/mmm-mode/mmm-auto.el:
  !! File error (("Cannot open load file" "cl-lib"))
 installed mmm-mode package post-installation script subprocess returned error exit status 1

If a cl-lib file is provided in order to attempt to support xemacs21,
there are other errors like

Wrong number of arguments: (lambda (oldfun newfun)
(byte-code "..." [newfun oldfun define-function make-obsolete] 3)), 4

because for some functions, the number of arguments for xemacs21
is different from the one for the latest GNU Emacs versions.

#1052164#10
Date:
2023-09-18 15:54:13 UTC
From:
To:
[...]

I've looked at the mmm-mode source and submitted a new bug with
a patch to avoid the issue on the mmm-mode side by disabling the
xemacs flavor (as other packages do that):

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1052166

I suppose that this is sufficient, but I don't know the Emacs
handling in Debian...