Emacs .emacs
設定内容
Elisp
  一番重要な .emacs
  データ型
    assoc 連想リスト
  制御構造
    if
    cond
    progn
  条件
    等しいか eq equal
    述語の種類
    数字の比較
    list の比較
    文字の比較
    変数内容が空の時
  関数定義
試す(評価する)
    Lisp Interaction
    eval-region
    c-x c-e
良く使う文
  setq
    setq と defvar
    append
    list
    cons
  autoload
  global-set-key
  custom-set-variables
  add-hook
    どんな hook があるか
良く使われる変数
    変数の値の調べ方
    load-path
    file-coding-system-alist
    debug-on-error
    default-frame-alist
    auto-mode-alist
    fill-column
  variables
  others
日本語環境
  coding-system
      まとめて
設定のこつ
    info を見る
    *.el の最初の方に
     *-vars.el の中
    だらだらと書かない
  mode line 等
    mail 状況
    時刻を表示
    行・桁番号
    スクロールバーの位置
  key
  scroll mouse
  Emacs 版別
  X Window System
  dired
    cc
  文字に色を付ける
    color-mate
  Font Lock
    set-face-font
  Faces
  fontset
  他の方の .emacs
  その他の URL
  DEFAULTS
  かっこ合せ
    add-change-log-entry
    add-log-mailing-address

emacs-21 | dot.emacs | application | 始め方 | emacs-20 | らくらく入門
Keymaps | key-bind.el

key

define-key global-map と global-set-key はどう違うのですか
(global-set-key "\C-xb" 'buffer-menu)
(define-key global-map "\C-c1" 'ispell-word         )  
(define-key global-map "\C-c2" 'ispell-region       )  
(define-key global-map "\C-c3" 'ispell-buffer       )  
C-c s に割当てる例
(global-set-key [?\C-c?s] 'tcode-isearch-and-yank-other-window)
C-x の設定 (lookup の例)
(define-key ctl-x-map "l" 'lookup)              ;C-x l -lookup
(define-key ctl-x-map "y" 'lookup-region)       ;C-x y -lookup-region
(define-key ctl-x-map "\C-y" 'lookup-pattern)   ;C-x C-y -lookup-pattern
Esc の設定
(define-key esc-map "c" 'compile)
(define-key esc-map "g" 'goto-line)
C- の設定
(define-key c-mode-map "\C-h" 'backward-delete-char-untabify)
(define-key c-mode-map "\C-m" 'reindent-then-newline-and-indent)
(define-key c-mode-map "\C-TAB" 'c-indent-command)
;(define-key c-mode-map "\C-m" 'newline-and-indent)
(define-key lisp-mode-map "\C-m" 'reindent-then-newline-and-indent)
(define-key lisp-mode-map "\e\C-y" 'put-sexp-on-kill-ring)
;; カーソルキー定義
; global key definition
(global-set-key "\eOA" 'previous-line)                  ;↑
(global-set-key "\eOB" 'next-line)                      ;↓
(global-set-key "\eOC" 'forward-char)                   ;→
(global-set-key "\eOD" 'backward-char)                  ;←
Emacs-21 では定義が変ってしまったので、個人的には..
(global-set-key [end]  'end-of-buffer )
(global-set-key [home] 'beginning-of-buffer )
あまり使わないものを M-x とか
(global-set-key [Meta_L] 'execute-extended-command)
(global-set-key [prior] 'execute-extended-command)
(global-set-key [next] 'browse-url-at-point)
C-h と BS (BackSpace) の入替:
;; (load "term/keyswap.el")	...  以前の方法
;; (load "obsolete/keyswap.el")	...  現在の位置
;; 最近の方法
(keyboard-translate ?\C-h ?\C-?)
(keyboard-translate ?\C-? ?\C-h)
以下は以前に行なっていた方法
(load "swap-C-h-Backspace")
(define-key function-key-map [backspace] [8])
(put 'backspace 'ascii-character 8)
(setq keyboard-translate-table
"\^@\^A\^B\^C\^D\^E\^F\^G\^?\^I\^J\^K\^L\^M\^N\^O\^P\^Q\^R\^S\^T\^U\^V\
\^W\^X\^Y\^Z\^[\^\\\^]\^^\^_ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK\
LMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\^H")
C-h と BS (BackSpace) の交換は、最近はこれらしい (2010/12/24 追加)
;;C-h と Backspace の交換
https://gist.github.com/754321
(global-set-key (kbd "C-h") 'delete-backward-char)
(global-set-key (kbd "") 'help-command)
この画面は Jeedosaquin によって表示しています。
Last Update: Sat, 07 Jun 2014 22:16:17 GMT 1.66 2008/03/08