【发布时间】:2017-12-13 21:03:05
【问题描述】:
我正在处理我的 .emacs 文件时,突然发生了一些事情。我无法编辑 .emacs 文件。每次我尝试修改文件然后保存时,它都会给我这个错误:
Symbol 的函数定义为 void:auto-update-file-header。
我试图删除 .emacs 文件本身,但每次我再次启动 emacs 时它都会回来。
这是我的 .emacs 文件包含的内容:
(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.
'(ansi-color-names-vector
["#212526" "#ff4b4b" "#b4fa70" "#fce94f" "#729fcf" "#e090d7" "#8cc4ff" "#eeeeec"])
'(custom-enabled-themes (quote (manoj-dark)))
'(package-selected-packages (quote (color-identifiers-mode flycheck))))
(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.
)
(require 'package)
(add-to-list 'package-archives
'("MELPA Stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-refresh-contents)
(add-hook 'after-init-hook #'global-flycheck-mode)
(add-hook 'after-init-hook 'global-color-identifiers-mode)
(add-to-list 'custom-theme-load-path "/Users/kjr132/.emacs.d/themes")
(set-cursor-color "#0a9dff")
(provide 'init-themes)
(add-to-list 'load-path' "~/.emacs.d/")
(package-install 'color-identifiers-mode)
(autoload 'auto-make-header "header2")
(add-hook 'write-file-hooks 'auto-update-file-header)
(add-hook 'emacs-lisp-mode-hook 'auto-make-header)
(add-hook 'c-mode-common-hook 'auto-make-header)
(add-hook 'tex-mode-hook 'auto-make-header)
(add-to-list 'load-path "~/.emacs.d")
(defun my-compilation-hook ()
(when (not (get-buffer-window "*compilation*"))
(save-selected-window
(save-excursion
(let* ((w (split-window-vertically))
(h (window-height w)))
(select-window w)
(switch-to-buffer "*compilation*")
(shrink-window (- h compilation-window-height)))))))
(add-hook 'compilation-mode-hook 'my-compilation-hook)
【问题讨论】:
-
那是emacs需要的文件,否则它不会重新创建自己。我认为你注定要失败;D