Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个现有命令 ( increment-numbers-in-region),它被声明interactive "r"用于获取区域起点和终点作为参数。我现在想扩展这个命令以获取前缀参数。有没有办法结合interactive "r"或者interactive "p"我应该以其他方式去做?
increment-numbers-in-region
interactive "r"
interactive "p"
我想我可以编写一个interactive "p"仅使用的命令,然后从命令体中读取点和标记,但感觉这可能不是最惯用的方式。
有任何想法吗?
C-hf interactive RET
interactive
“要获得多个参数,请连接各个字符串,用换行符分隔它们。”
(defun increment-numbers-in-region (start end arg) (interactive "r\np") ...)