免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1125 | 回复: 0
打印 上一主题 下一主题

xemacs一点点变态的地方 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-03-21 00:21 |只看该作者 |倒序浏览


文件:
setnu.el.zip
大小:
5KB
下载:
下载
(require 'font-lock)
;;enable syntax highlighting, it's different with emacs
(set-face-foreground 'font-lock-function-name-face "red3")
(set-face-foreground 'font-lock-keyword-face "blue3")
(set-face-foreground 'font-lock-comment-face "dark green")
(set-face-foreground 'font-lock-type-face "blue3")
;显示匹配的括号
(setq show-paren-mode t)
(setq-default transient-mark-mode t)
(setq inhibit-startup-message t)
(setq column-number-mode t)
(setq mouse-yank-at-point t)
(setq visible-bell t)
;设置窗口大小
(if window-system
   (setq default-frame-alist
       (append
         '((font . "8x13")
            (top . 0)
            (left . 0)                             
            (width . 132)
            (height . 50))
   default-frame-alist)))
;启动时不显示窗口信息
(setq inhibit-startup-message t)
;不要backup文件
(setq make-backup-files nil)
;;在标题栏显示buffer的名字,而不是
emacs@xxxxx.com
这样没用的提示。
;;(setq frame-title-format "
[email=xemacs@%b]xemacs@%b[/email]
")
(setq frame-title-format "%b @@others@@ %f")
;让 Emacs 可以直接打开和显示图片。
(setq auto-image-file-mode t)
;设置默认的工作目录
(setq default-directory "e:/src/")
;显示行号, use setnu.el
(require 'setnu)
(setq setnu-mode t)
(setq turn-on-setnu-mode t)
(add-hook 'text-mode-hook 'turn-on-setnu-mode)
(add-hook 'python-mode-hook 'turn-on-setnu-mode)
(add-hook 'cperl-mode-hook 'turn-on-setnu-mode)
(add-hook 'cc-mode-hook 'turn-on-setnu-mode) ;;cc-mode不起作用,why
(add-hook 'c-mode-hook 'turn-on-setnu-mode)
(add-hook 'c++-mode-hook 'turn-on-setnu-mode)
;;设置cc-mode
(require 'cc-mode)
(defun my-c-mode-common-hook ()
  (c-set-style "stroustrup")        ;; 代码缩进风格
  (c-toggle-auto-hungry-state t)    ;;删除时一口吃掉前或后所有的空格
  (c-toggle-hungry-state t)
  (setq tab-width 4                 ;; tab width 控制
        indent-tabs-mode nil)
  (setq c-cleanup-list              ;; clean up 方式选择, 详见帮助.
        '(scope-operator
          empty-defun-braces
          defun-close-semi)))
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)





本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/16953/showart_262231.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP