0

Why can't i remap my keys with the following command in my spacemacs init.el file?

(global-set-key (kbd "C-+") 'frm-zoom-in)

For some reason,it gives me the following error:

Wrong type argument,commandp, frm-zoom-in.

When I try to wrap it into a custom function:

(defun frm-zoom-plus (&optional arg)
  (interactive "P")
  (frm-zoom-in arg "u"))

It gives me the following error: Symbol's function definition is void: frm-zoom-in.

How do I fix this?

Drew
  • 75,699
  • 9
  • 109
  • 225
  • `frm-zoom-in` does not seem to be a defined function. Indeed, it's not defined in vanilla Emacs (although Spacemacs might be different). Why do you think that it *is* defined? Can you point us to its definition? – NickD Mar 05 '23 at 03:19
  • Try `F1 f the-function` to see whether the function you want to use is defined. – shynur Mar 05 '23 at 05:19

1 Answers1

1

You need to load the library that defines that function.


But I suspect that you have the command name wrong, and you're using library zoom-frm.el. If so, the command is named zoom-frm-in, not frm-zoom-in.

Of course it's possible that some other library defined a command with a similar command, and that's what you want. If so, just load that library.

Drew
  • 75,699
  • 9
  • 109
  • 225
  • But even if i go M-x, load-library, then select zoom-frm.el, i get the same error output. What should i do? – Matthey969 Mar 05 '23 at 21:20
  • i changed my init file to: (global-set-key (kbd "C-+") 'frm-zoom-in) error message is: wrong type argument,commandp,frm-zoom-in – Matthey969 Mar 05 '23 at 21:24
  • Are you trying to use library zoom-frm.el or some other library? If the former, the command is zoom-frm-in, not frm-zoom-in. When you tried to load it, did it load? It sounds like it didn't. Is the file or its directory in your `load-path`? If not, `load-library` and `require` won't find it. – Drew Mar 06 '23 at 03:43