jwiegley / use-package

A use-package declaration for simplifying your .emacs
https://jwiegley.github.io/use-package
GNU General Public License v3.0
4.42k stars 260 forks source link

Symbol's function definition is void: function-put #970

Closed GiovanH closed 2 years ago

GiovanH commented 2 years ago

Trying to install on emacs 24.3, but when I load emacs with use-package installed as a package, I get the startup error eval-buffer: Symbol's function definition is void: function-put.

I assumed this was a version issue, but the package says it should support 24.3.

--debug-init doesn't print any additional information.

Manually adding in

(defalias 'function-put
  ;; We don't want people to just use `put' because we can't conveniently
  ;; hook into `put' to remap old properties to new ones.  But for now, there's
  ;; no such remapping, so we just call `put'.
  #'(lambda (function prop value)
      "Set FUNCTION's property PROP to VALUE.
The namespace for PROP is shared with symbols.
So far, FUNCTION can only be a symbol, not a lambda expression."
      (put function prop value)))
(function-put 'use-package 'lisp-indent-function '1)

patches the problem.

skangas commented 2 years ago

@jwiegley How do you feel about bumping the minimum version requirement to 25.1?

jwiegley commented 2 years ago

Given that @GiovanH needs it, there are probably others. If we can hold on to Emacs 24 compatibility, I'd prefer to. Once it becomes onerous, then we can move up.

skangas commented 2 years ago

@GiovanH I don't see where function-put is used in use-package. Could you please show a complete backtrace?

skangas commented 2 years ago

More information was requested, but none was given within 2 weeks. FWIW, the current tests also seem to be working on Emacs 24.3 with some fixes that were recently added by yours truly.

I'm therefore closing this bug report. If this is still an issue, please report back and we can reopen.

Thanks.