colonelpanic8 / multi-line

multi-line everything from function invocations and definitions to array and map literals in a wide variety of languages
57 stars 6 forks source link

Fix for Emacs 28: order of class definition matter #16

Closed snippins closed 1 year ago

snippins commented 3 years ago

In emacs 28, initform is actually called right at the moment when we define a class. So we need to rearrange class "multi-line-selecting-respacer" to be above "multi-line-fill-respacer"

emacs18 commented 2 years ago

Change 7c5fbae was checked in on Jan 5, 2021. After this change emacs fails to bytecompile few files in multi-line package due to use of defclass without (require 'eieio) to define it. For now I added one line in each file in multi-line package like this in my own clone of multi-line:

(eval-when-compile (require 'eieio))  ;; for defclass macro

Without above line, my spacemacs (using straight.el rather than package.el) fails to bytecompile with errors like this for emacs 27, 28, and 29:

Debugger entered--Lisp error: (void-variable multi-line-candidate)
  byte-code("\301\...
  require(multi-line-candidate)

The problem seems to be that eieio.el has defgeneric and defclass. defgeneric may be osolete in emacs 29, but not defclass. Hence we still need to load eieio.el to define defclass.

colonelpanic8 commented 1 year ago

merged in https://github.com/IvanMalison/multi-line/commit/d12adf051cc7630cf1e635814f8f2a8255c91e6f

Thanks @snippins