3

My life depends on the vm email reader in emacs, and I'm currently using vm 8.2.0b under emacs 25.2.2. When trying to upgrade emacs, I run into problems.

In emacs 26.3, I get the message "Symbol's function definition is void, defun*" -- the asterisk after 'defun' is key here, I believe.

Drew
  • 75,699
  • 9
  • 109
  • 225
user36010
  • 31
  • 2
  • 1
    How about putting this somewhere near the top of your `.emacs` / `init.el` file? `(require 'cl)`. There have been some changes in Emacs 26 to the `cl-` library that could break some functionality that was relied upon in Emacs 25, but perhaps the changes will not affect your use-case. – lawlist Aug 30 '21 at 21:53
  • Wow, that worked! Many thanks! – user36010 Aug 30 '21 at 21:59
  • @lawlist: Please consider making that an answer. – Drew Aug 31 '21 at 02:36

1 Answers1

2

defun* is an alias for cl-defun, which is a macro defined in cl-macs.el. Prior to loading a library that uses defun*, consider expressly loading the cl-... libraries with (require 'cl). Some important changes were made to the cl-... libraries in Emacs 26, which differ from those of Emacs 25. If the O.P. encounters problems with the cl-... libraries that were not present in Emacs 25, then it may be necessary to invest time debugging to track down the relevant changes ....

lawlist
  • 18,826
  • 5
  • 37
  • 118
  • 1
    For clarity, `(require 'cl-lib)` would load the modern name-spaced `cl-*` things, while `(require 'cl)` will load the older names without the `cl-` prefix. – phils Aug 31 '21 at 04:44