emacs
文章平均质量分 57
robin_chenyu
这个作者很懒,什么都没留下…
展开
-
tabs indent
<br />;; n(setq c-basic-offset 4) <br />;; (setq tab-width 4) ; cause the TAB file-character to be interpreted as mod-N indentation<br />;; (setq indent-tabs-mode nil) ; cause TAB characters to not be used in the file for compression, and for原创 2010-08-28 21:01:00 · 634 阅读 · 0 评论 -
INFO 手册安装及tags创建
<br />cd /path/to/info<br />for f in * ; do install-info $f dir ; done<br /> <br />更新PATH_INFO原创 2010-08-28 20:51:00 · 503 阅读 · 0 评论 -
emacs中根据系统变量设置字符编码
<!--html {font-family:Times,serif; font-size:12pt}.title {text-align:center}.todo {color:red}.done {color:green}.tag {background-color:#add8e6; font-weight:normal}.timestamp原创 2013-04-26 11:46:53 · 1281 阅读 · 0 评论 -
emacs工程自定义变量
1. 在多个工程中,又存在子目录的情况,global tags需要定制运行命令,这样每次都需要手动更新 2. 解决方案:在工程目录中文件.dir-locals.el,开启本目录或者子目录文件时,就会读取里面的变量值 ((c-mode (proj-dir . "e:/project1/") (proj . "123") (proj-name . "proj-name"原创 2013-01-11 09:05:20 · 839 阅读 · 0 评论 -
emacs+autocomplete+semantic实现自动补全
;; for cedet(load-file "~/site/cedet-1.1/common/cedet.el")(global-ede-mode t)(semantic-load-enable-semantic-debugging-helpers)(semantic-load-enable-excessive-code-helpers)(setq semantic-idle原创 2013-01-10 21:44:20 · 2229 阅读 · 0 评论 -
backup.el 备份文件
(defconst +bufname+ "*copy-files*")(defconst +proname+ "*backup-files*")(defconst +tmpbufname+ "*tmp-files*")(defun copy-file (process event) (let* ((f (get-file)) (args "-rfv")原创 2013-01-06 22:06:51 · 682 阅读 · 0 评论 -
emacs中控制程序自重启
* monitor.el** 程序流程 1. vpn-start,vpn-stop是两个控制openvpn启动和停止的命令 2. vpn-cmd是从emacs中调用vpn-start,vpn-stop命令的 3. vpn-dumped是openvpn状态改变后的处理程序原创 2013-01-07 12:36:29 · 491 阅读 · 0 评论 -
emacs中闭包的使用
* emacs中的closure 1. 首先要打开lexical-binding变量 (setq lexical-binding t) 2. 测试程序 (let ((lst '(1 2 3 4 5 6 7 8 9))) (setq get1 (lambda () (let ((x (car lst))) (se原创 2013-01-05 22:00:57 · 678 阅读 · 0 评论 -
利用package包管理安装emacs插件
emacs中的package包管理插件非常方便,首先添加以下代码到.emacs中,然后M-x package-list-packages(require 'package)(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/") t)(add-to-list 'packag原创 2013-01-04 21:17:05 · 7124 阅读 · 0 评论 -
分享一下我是如何切换 buffer 的吧
原文: http://www.newsmth.net/bbscon.php?bid=573&id=103634;; -------------------------------------------------------------------;; buffer;; ---------------------------------------------------------转载 2013-01-04 21:03:20 · 808 阅读 · 0 评论 -
emacs+slime+sbcl 单步调试
(defun next (x y) (/ (+ x y) 2))(defun square (x) (* x x))(defun sqrt-r(a b x) (declare (optimize (debug 3) (speed 0) (space 0) (compilation-speed原创 2012-01-31 10:59:35 · 1569 阅读 · 0 评论 -
emacs 学习Searching Exercises
(defun test-search (str) "Search a string" (interactive "MInput String:") (message "String is %s" str) (if (eq nil (search-forward str nil t)) (message "NOT FOUND!") (message "FOUND!")))原创 2010-09-20 08:59:00 · 406 阅读 · 0 评论 -
emacs学习 6.3 Exercise with Narrowing
Exercise:Write a function that will display the first 60 characters of the current buffer, even if you have narrowed the buffer to its latter half so that the first line is inaccessible. 1 (defun narrowing60 () 2 "Narrowing buffer and only display the fi原创 2010-09-01 09:37:00 · 519 阅读 · 0 评论 -
emacs字体设置
emacs_fontTable of Contents1. emacs中中文字体修改1 emacs中中文字体修改中文字体修改指定中文字体的同时,修改中文字体的缩放比例,这样在org-mode中使用table可以对齐。(set-face-attribute 'default nil :font "consolas-10:weight=norma原创 2014-02-22 16:55:49 · 2166 阅读 · 0 评论