开发者

NXML Mode C-RET problem in Aquamacs

开发者 https://www.devze.com 2023-03-28 15:56 出处:网络
I have an odd problem in Aquamacs-- when I am editing in nXML mode the key sequence C-return calls a completely different function than it should under nXML mode. It calls something called cua-set-rec

I have an odd problem in Aquamacs-- when I am editing in nXML mode the key sequence C-return calls a completely different function than it should under nXML mode. It calls something called cua-set-rectangle-mark, instead of nxml-complete. I have no idea what the CUA mode is, but I tried to just properly remap it with something like this:

(add-hook 'nxml-mode-hook
          '(lambda ()
             (define-key nxml-mode-map (kbd "C-RET") 'nxml-complete)))

It seems, however, that this CUA mapping overrides e开发者_运维知识库ven nxml-mode-map within the mode, because this had no effect at all. Am I missing something? Is this a peculiarity of Aquamacs vs. vanilla emacs? My emacs configurations on other machines all work fine with nXML mode, this is only an issue in Aquamacs.


Aquamacs enables "cua-mode" by default (which is what is setting the "cua-set-rectangle-mark" keybinding). Put the following code in your Emacs init file to globally disable this:

(cua-mode 0)

Alternatively, if you want to keep cua-mode and cua-mode's rectangle functionality but not the keybinding, you can change the keybinding by customizing the global variable "cua-rectangle-mark-key" (which is set by default to "control return").

0

精彩评论

暂无评论...
验证码 换一张
取 消