简体   繁体   English

阻止Emacs读取OS X剪贴板?

[英]Prevent Emacs from reading the OS X clipboard?

How can I prevent GNU Emacs.app on OS X from reading from reading from the OS X keyboard unless explicitly asked to? 除非明确要求,如何防止从OS X键盘读取OS X上的GNU Emacs.app?

For example, if I yank something from emacs, then copy something to the OS X clipboard, I don't want a subsequent put to paste from the clipboard — I'd like it to be whatever was last yank'd. 例如,如果我从emacs中提取内容,然后将内容复制到OS X剪贴板,则我不希望随后从剪贴板中粘贴内容-我希望它是最后一次提取的内容。

This is controlled by the variables interprogram-paste-function and interprogram-cut-function , if they are bound to a function, the function is called to retrieve whatever is in the system clipboard or setting the clipboard. 这由变量interprogram-paste-functioninterprogram-cut-function ,如果它们绑定到一个函数,则调用该函数以检索系统剪贴板中的任何内容或设置剪贴板。 You can disable this by setting them to nil : 您可以通过将它们设置为nil来禁用它:

(setq interprogram-paste-function nil)
(setq interprogram-cut-function nil)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM