我最近安装了一些软件包,以便我可以从 emacs 编写 iOS 应用程序,但我遇到了一些麻烦。其中一个包(我很确定它是自动完成的)正在阻止制表符完成在 ansi-term 中工作。每当我尝试制表符完成时,都会收到错误“错误类型参数:characterp,制表符”。
这是我的 .emacs 文件:
; Add packages
(add-to-list 'load-path "~/.emacs.d/elpa")
(add-to-list 'load-path "~/.emacs.d/packages")
(require 'package)
; Package sources
(add-to-list 'package-archives
'("marmalade" .
"http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives
'("melpa" .
"http://melpa.milkbox.net/packages/") t)
(package-initialize)
; Check packages were loaded
(require 'linum-relative)
(require 'git-gutter-fringe)
(require 'yasnippet)
(require 'auto-complete-config)
; Enable packages
(elscreen-start)
; Config
; Color scheme
(load-file "~/.emacs.d/themes/color-theme-wombat.el")
; Enable snippets
(yas-global-mode 1)
; Copy/paste with the system clipboard
(setq x-select-enable-clipboard t)
; Enable relative line numbers
(global-linum-mode t)
; Enable git gutter
(global-git-gutter-mode t)
(setq git-gutter-fr:side 'left-fringe)
; Darker git gutter colors
(set-face-foreground 'git-gutter-fr:modified "#ccaa8f")
(set-face-foreground 'git-gutter-fr:added "#333366")
(set-face-foreground 'git-gutter-fr:deleted "#e5786d")
; C-x -> arrow changes windows
(global-set-key (kbd "C-x <up>") 'windmove-up)
(global-set-key (kbd "C-x <down>") 'windmove-down)
(global-set-key (kbd "C-x <right>") 'windmove-right)
(global-set-key (kbd "C-x <left>") 'windmove-left)
; Hide everything that isn't text
(tool-bar-mode -1)
(scroll-bar-mode -1)
(menu-bar-mode -1)
; Move backups
(setq backup-directory-alist
`((".*" . ,"~/.emacsbackups")))
(setq auto-save-file-name-transforms
`((".*" ,"~/.emacstemps" t)))
(setq backup-by-copying t)
; Autocomplete settings
;when to use autocomplete (note yasnippits)
(setq-default ac-sources '(ac-source-yasnippet ac-source-abbrev ac-source-dictionary ac-source-words-in-same-mode-buffers))
(global-auto-complete-mode t)
(add-to-list 'ac-modes 'objc-mode) ; For iOS dev