emacs lisp call function with prefix argument programmatically
If I’m understanding you right, you’re trying to make a keybinding that will act like you typed C-u M-x grep <ENTER>. Try this: (global-set-key (kbd “C-c m g”) (lambda () (interactive) (setq current-prefix-arg ‘(4)) ; C-u (call-interactively ‘grep))) Although I would probably make a named function for this: (defun grep-with-prefix-arg () (interactive) (setq current-prefix-arg ‘(4)) … Read more