Commit 0df37f74 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/vt-control.el: Avoid `called-interactively-p`

(vt-keypad-on, vt-keypad-off): Use the `tell` arg instead.
(vt-numlock): Add `tell` arg.
parent cf774fb8
Pipeline #10286 passed with stages
in 12 minutes and 59 seconds
......@@ -83,26 +83,24 @@
(defun vt-keypad-on (&optional tell)
"Turn on the VT applications keypad."
(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 "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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment