use "r" interactive specifier

This commit is contained in:
Markus Triska
2020-10-03 17:13:17 +02:00
parent b4ccd889af
commit 83350f8866

View File

@@ -42,14 +42,12 @@
(defvar showterm-pixel-width 500 (defvar showterm-pixel-width 500
"Width of the drawn term in pixels.") "Width of the drawn term in pixels.")
(defun showterm (arg) (defun showterm (from to)
(interactive "p") (interactive "r")
(unless (use-region-p) (unless (use-region-p)
(error "no region")) (error "No region"))
(let* ((from (region-beginning)) (let ((str (buffer-substring-no-properties from to))
(to (region-end)) op-declarations)
(str (buffer-substring-no-properties from to))
op-declarations)
(save-excursion (save-excursion
;; rudimentary support for op/3 directives. ;; rudimentary support for op/3 directives.
(goto-char (point-min)) (goto-char (point-min))