软件工程

本类阅读TOP10

·PHP4 + MYSQL + APACHE 在 WIN 系统下的安装、配置
·Linux 入门常用命令(1)
·Linux 入门常用命令(2)
·使用 DCPROMO/FORCEREMOVAL 命令强制将 Active Directory 域控制器降级
·DirectShow学习(八): CBaseRender类及相应Pin类的源代码分析
·基于ICE方式SIP信令穿透Symmetric NAT技术研究
·Windows 2003网络负载均衡的实现
·一网打尽Win十四种系统故障解决方法
·数百种 Windows 软件的免费替代品列表
·收藏---行百里半九十

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
emacs 中文乱码解决方案

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

emacs 中文乱码解决方案

;;通过在.emacs中设置字体解决了emacs字体颠倒的问题
;;首先设置环境变量HOME,使其指向一个特定的目录
;;在这个目录下建立.emacs文件,使其内容如本文所示
;; Are we running XEmacs or Emacs?
(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
;; Set up the keyboard so the delete key on both the regular keyboard
;; and the keypad delete the character under the cursor and to the right
;; under X, instead of the default, backspace behavior.
(global-set-key [delete] 'delete-char)
(global-set-key [kp-delete] 'delete-char)

(cond ((not running-xemacs)
    (set-foreground-color "Navy")
    (set-background-color "Grey")
    (set-cursor-color "black")
    (set-default-font "-*-Fixedsys-*-*-*-*-*-*-*-*-*-*-fontset-default")
    (set-language-environment 'Chinese-GB)
    (set-terminal-coding-system 'euc-cn)
    (set-keyboard-coding-system 'cn-gb-2312-unix)
))
(cond (running-xemacs
))
;; Always end a file with a newline
(setq require-final-newline t)
;; Stop at the end of the file, not just add lines
(setq next-line-add-newlines nil)
(global-set-key (quote [f4]) (quote set-mark-command))
(global-set-key (quote [f3]) (quote goto-line))
(defun my-c-mode-common-hook ()
  ;; add my personal style and set it for the current buffer
  (c-set-style "k&r")
  ;; offset customizations not in my-c-style
  (c-set-offset 'member-init-intro '++)
  ;; other customizations
  (setq tab-width 4
        ;; this will make sure spaces are used instead of tabs
        indent-tabs-mode nil)
  ;; we like auto-newline and hungry-delete
  (c-toggle-auto-hungry-state 1)
  (font-lock-mode 2)
  ;; keybindings for all supported languages.  We can put these in
  ;; c-mode-base-map because c-mode-map, c++-mode-map, objc-mode-map,
  ;; java-mode-map, and idl-mode-map inherit from it.
  (define-key c-mode-base-map "\C-m" 'newline-and-indent)
  )
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)

 




相关文章

相关软件