3

C-u invokes the function universal-argument, and you want to ensure that eval-last-sexp is called as if you invoked it interactively, which is done with call-interactively. You can simulate universal-argument by let-binding current-prefix-arg. Putting that all together: (global-set-key (kbd "C-c c") (lambda () (...


2

I think it's a bug. If you don't use that alist as the KEYMAP arg, but instead you create a keymap, assign it to a variable, use define-key with (kbd "C-n") etc., and use that variable as the KEYMAP arg, then it works. Please consider using M-x report-emacs-bug, to report this. (setq toto-map (make-sparse-keymap)) (defun foo () "..." (...


1

You want to set that variable to a string. This ought to work: (use-package lsp-mode :init (setq lsp-keymap-prefix "s-k")) You had :ensure t in there as well, but it doesn't have anything to do with configuring the package; instead it causes use-package to try to install lsp-mode if it isn't available. You might want to include it, or you ...


Only top voted, non community-wiki answers of a minimum length are eligible