0

I'm new to emacs, I have the following keybinding which invokes my custom keybinding.

 (eval-after-load 'evil-ex
   '(evil-ex-define-cmd "mf" 'someFun))

It calls someFun correctly, but what if I want it to have default switches like "-ignore-case" to be directly associated with this key binding. How can I do that?

legoscia
  • 39,593
  • 22
  • 116
  • 167
Dennis
  • 159
  • 1
  • 11
  • 1
    Usually the best way is to define a specialized variant of `someFun`, but you'd have to post the code of `someFun` to get an exact answer. – jpkotta Feb 03 '20 at 18:41
  • @jpkotta unfortunately, I someFun is something like gud-break which is provided by a third party provider. I'm not sure if I can modify that. – Dennis Feb 04 '20 at 14:10
  • 1
    You don't need to modify it, you usually just wrap it with your own function. If for some reason you do need to modify it, you can use advice. Looking at `gud-break`, it's defined by a macro, and it's defined differently for different gud modes. It's probably best to just define your own custom command with the `gud-def` macro. – jpkotta Feb 04 '20 at 17:39

0 Answers0