Emacs三叉戟模式密钥绑定未激活
我是Emacs的初学者。我正在尝试对Parenscript使用三叉戟模式。我已将命令从trident模式站点复制到init.el文件中。但是三叉戟模式键绑定C-C-e不起作用。我正在将完整的init.el文件复制粘贴到下面:Emacs三叉戟模式密钥绑定未激活,emacs,parenscript,Emacs,Parenscript,我是Emacs的初学者。我正在尝试对Parenscript使用三叉戟模式。我已将命令从trident模式站点复制到init.el文件中。但是三叉戟模式键绑定C-C-e不起作用。我正在将完整的init.el文件复制粘贴到下面: ;; Added by Package.el. This must come before configurations of ;; installed packages. Don't delete this line. If you don't want it,
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
;;;; Added from Melpa.org
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl "http" "https")))
(when no-ssl (warn "\
Your version of Emacs does not support SSL connections,
which is unsafe because it allows man-in-the-middle attacks.
There are two things you can do about this warning:
1. Install an Emacs version that does support SSL and be safe.
2. Remove this warning from your init file so you won't see it again."))
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
)
; Commented coz it is there in the next line (package-initialize)
;;;; End Melpa.ord addition
(package-initialize)
(load (expand-file-name "~/quicklisp/slime-helper.el"))
;; Replace "sbcl" with the path to your implementation
(setq inferior-lisp-program "sbcl")
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages (quote (trident-mode))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:family "DejaVu Sans Mono" :foundry "PfEd" :slant normal :weight normal :height 158 :width normal)))))
;;; From Trident-model.el site on Github
(add-to-list 'auto-mode-alist (cons "\\.paren\\'" 'lisp-mode))
(add-hook 'lisp-mode-hook
#'(lambda ()
(when (and buffer-file-name
(string-match-p "\\.paren\\>" buffer-file-name))
(unless (slime-connected-p)
(save-excursion (slime)))
(trident-mode +1))))
;;;; From same site, key bindings
(trident-add-keys-with-prefix "C-c C-e")
;; The key sequence for trident-eval-region is "e r", so it's now bound to "C-c C-e er"
**This is What is Not getting Activated**
若我打开一个.paren文件,我观察到的一件事是,repl buffer位于顶部,而显示.paren文件的文件buffer位于下面。我不知道如何解决这个问题。但我确实通过点击缓冲区名称来交换它们。我不知道它是否相关,但我写它只是为了以防万一,这是罪魁祸首。如果可能的话,我更喜欢上面的常规程序文本和下面的repl缓冲设置
我做错了什么?谢谢你的帮助
编辑1:我已经添加了三叉戟模式网站的链接。谢谢Phils的回答
我正在发布我所做的更改:
早些时候,我使用:
(trident-add-keys-with-prefix "C-c C-e")
这是行不通的。根据菲尔的建议,我用
(with-eval-after-load "trident-mode" (trident-add-keys-with-prefix "C-c C-e"))
这起作用了
我是个新手,所以我有一个看似简单/显而易见的详细答案。这是为了帮助像我这样的新手。我们可能会对最小的事情感到困惑-
,再次感谢。请链接到您正在使用的Github上的Trident-model.el网站。MELPA上有Trident模式,但该版本中没有自动加载带前缀的Trident add Key,因此我不希望您看到错误。试试这个:用eval-after-load三叉戟模式,三叉戟添加前缀为C-C-eSorry的键,关于这个延迟@phils。我现在在问题中添加了三叉戟模式链接。加载后,我应该在什么时候输入带eval的。。。密码你能告诉我为什么我在编辑emacs abc.paren时得到反向slime repl文件吗?我已经把你的答案贴在下面了。再次感谢。对不起,我不明白最后一个问题。我自己不使用这些模式中的任何一种。