Chinaunix首页 | 论坛 | 博客
  • 博客访问: 36026
  • 博文数量: 16
  • 博客积分: 520
  • 博客等级: 中士
  • 技术积分: 170
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-01 08:58
文章分类

全部博文(16)

文章存档

2012年(1)

2011年(4)

2010年(8)

2009年(3)

我的朋友

分类: C/C++

2010-03-26 21:41:20

1. 安装template.el 后 每次退出emacs 最后 都会提示: update header in .ido.last
   而且都要你回答y/n 烦。
   查看ido.el 搜索.ido.last 出现在
   (defcustom ido-save-directory-list-file (convert-standard-filename "~/.ido.last")
    接着就查ido-savw-directory-list-file:
   应该就是这个函数了
   (defun ido-save-history ()
  "Save ido history and cache information between sessions."
  (interactive)
  (when (and ido-last-directory-list ido-save-directory-list-file)
    (let ((buf (get-buffer-create " *ido session*"))
      (version-control 'never))
      (unwind-protect
      (with-current-buffer buf
        (erase-buffer)
        (insert ";;; -*- coding: utf-8 -*-\n")
        (setq buffer-file-coding-system 'utf-8)
        (ido-pp 'ido-last-directory-list)
        (ido-pp 'ido-work-directory-list)
        (ido-pp 'ido-work-file-list)
        (ido-pp 'ido-dir-file-cache "\n\n ")
        (if (listp ido-unc-hosts-cache)
        (ido-pp 'ido-unc-hosts-cache)
          (insert "\n;; ----- ido-unc-hosts-cache -----\nt\n"))
        (write-file ido-save-directory-list-file nil))
    (kill-buffer buf)))))
猜一下应该要(and ido-last-directory-list ido-save-directory-list-file)
两个同时成立才会执行这个函数的
ido-save-directory-list-file 这个肯定不为空了
所以就把ido-last-directory-list 设置为空吧
在~/_emacs 中加上(setq ido-last-directory-list nil)
OK! :-) template的功能也正常使用
阅读(1260) | 评论(1) | 转发(0) |
0

上一篇:c++ 代码风格

下一篇:阅读列表

给主人留下些什么吧!~~

chinaunix网友2010-04-11 05:35:06

似乎emacs23不行了。 我是干脆(remove-hook 'kill-emacs-hook 'ido-kill-emacs-hook)搞的。很暴力。