Questions tagged [bind-key.el]

7 questions
5
votes
2 answers

how to define bindings for multiple keymaps with bind-keys?

I use bind-key and I haven't found anything else that convenient for organizing key bindings. However sometimes I want to bind some commands for more keymaps than one. That's the way I do it now for both maps. (bind-keys :map some-map …
bertfred
  • 1,699
  • 1
  • 11
  • 23
1
vote
0 answers

use-package do not bind in latex-mode-map

this is a part of my init file (use-package tex-site :ensure auctex :mode ("\\.tex\\'" . latex-mode) :bind (:map LaTeX-mode-map (" " . TeX-command-save-buffer-and-run-all))) :init (defun TeX-command-save-buffer-and-run-all…
gigiair
  • 2,124
  • 1
  • 8
  • 14
1
vote
1 answer

How to make exceptions to bind-key* overriding behavior?

I like binding M-n to make-frame, so I have the following in my init file: (bind-key* "M-n" 'make-frame) The * form of bind-key allows me to override other minor-mode M-n bindings. But when I'm using the minibuffer (e.g. find-file), I'd rather M-n…
ivan
  • 1,928
  • 10
  • 20
0
votes
1 answer

bind-keys with a macro for lambda functions

I am trying to bind keys to a lambda function using bind-key.el. I have the following factor macro ;; taken from Emacs Doom (defmacro cmd! (&rest body) (declare (doc-string 1) (pure t) (side-effect-free t)) `(lambda (&rest _) (interactive)…
Tohiko
  • 1,589
  • 1
  • 10
  • 22
0
votes
0 answers

bind-key works but not bind-keys

I am having an issue with bind-key where the following command works (bind-key* "s-c q" #'quick-calc) but (bind-keys* ("s-c q" . #'quick-calc)) does not. Instead I get the error command-execute: Wrong type argument: commandp, #'quick-calc when I…
Tohiko
  • 1,589
  • 1
  • 10
  • 22
0
votes
1 answer

How to redefine key binding for "C-m" without clobbering ?

I am trying to remap "C-m" but it seems to prevent from working. It actually seems to make the same as "C-m". I have no idea why. I have tried this, which causes the problem: (bind-keys :map global-map ("C-m" . jump-char-backward) …
cammil
  • 509
  • 3
  • 12
0
votes
0 answers

"No such file or directory, bind-key" after installing use-package

I'm using Emacs on Windows 10. I want to override key bindings, so after reading How to override major mode bindings, I installed use-package with the built-in package manager (via M-x package-install RET use-package RET). The package came from the…