diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-04-12 12:49:36 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-04-12 12:49:36 -0400 |
commit | 0df37f741679f99bb57da138e61c91a99ed918a5 (patch) | |
tree | e6d25e0250012a9a0d572e805e7b0949cab71bb5 /lisp | |
parent | cf774fb8cc0404e00e284a75862d95b5cbc1e94d (diff) | |
download | emacs-0df37f741679f99bb57da138e61c91a99ed918a5.tar.gz emacs-0df37f741679f99bb57da138e61c91a99ed918a5.tar.bz2 emacs-0df37f741679f99bb57da138e61c91a99ed918a5.zip |
* lisp/vt-control.el: Avoid `called-interactively-p`
(vt-keypad-on, vt-keypad-off): Use the `tell` arg instead.
(vt-numlock): Add `tell` arg.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/vt-control.el | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lisp/vt-control.el b/lisp/vt-control.el index 0bd5132f7c3..bac0069b852 100644 --- a/lisp/vt-control.el +++ b/lisp/vt-control.el @@ -83,26 +83,24 @@ (defun vt-keypad-on (&optional tell) "Turn on the VT applications keypad." - (interactive) + (interactive "p") (send-string-to-terminal "\e=") (setq vt-applications-keypad-p t) - (if (or tell (called-interactively-p 'interactive)) - (message "Applications keypad enabled."))) + (if tell (message "Applications keypad enabled."))) (defun vt-keypad-off (&optional tell) "Turn off the VT applications keypad." (interactive "p") (send-string-to-terminal "\e>") (setq vt-applications-keypad-p nil) - (if (or tell (called-interactively-p 'interactive)) - (message "Applications keypad disabled."))) + (if tell (message "Applications keypad disabled."))) -(defun vt-numlock nil +(defun vt-numlock (&optional tell) "Toggle VT application keypad on and off." - (interactive) + (interactive "p") (if vt-applications-keypad-p - (vt-keypad-off (called-interactively-p 'interactive)) - (vt-keypad-on (called-interactively-p 'interactive)))) + (vt-keypad-off tell) + (vt-keypad-on tell))) (provide 'vt-control) |