|
From: | Ypo |
Subject: | Re: Keybinding doubt about ARG |
Date: | Sun, 19 Jun 2022 18:56:47 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 |
Working, thanks Bruno!
I needed it, because what I was
using is not working well:
(global-set-key (kbd "M-n") (kbd "C-u 1 C-v"))
From some time ago, it doesn't work in .org buffers, although it works in elisp buffers.
In .org buffers I receive this message:
After 0 kbd macro iterations: command-execute: Keyboard macro terminated by a command ringing the bell
Best regards
Ypo <ypuntot@gmail.com> writes:Is it possible to use ARG when defining keybindings? For the command (scroll-up-command &optional ARG) I want to define this keybind: (define-key global-map (kbd "M-n") 'scroll-up-command 1) But: eval-region: Wrong number of arguments: define-key, 4I don't think that 'define-key' allows to specify extra arguments. But, you can easily define your own command. (defun my-scroll-up-of-1 () (interactive) (scroll-up-command 1)) (define-key global-map (kbd "M-n") 'my-scroll-up-of-1)
[Prev in Thread] | Current Thread | [Next in Thread] |