;; オープニングメッセージを表示しない (setq inhibit-startup-message t)
;; バックアップファイルを作成しない ;; 危険なので、注意して下さい (setq make-backup-files nil)
;; オートセーブファイルを作成しない ;; 危険なので、注意して下さい (setq auto-save-default nil) (setq auto-save-list-file-name nil) (setq auto-save-list-file-prefix nil)
;; C-k 1回で行全体を削除する (setq kill-whole-line t)
;; バッファの最後で next-line しても新しい行を挿入しない (setq next-line-add-newlines nil)
;; 1行づつスクロールする (setq scroll-conservatively 1)
;; 対応する括弧をハイライトする (show-paren-mode 1)
;; カーソル位置の桁数をモードライン行に表示する (column-number-mode 1)
;; カーソル位置の行数をモードライン行に表示する (line-number-mode 1)
;; リージョンを色付きにする (transient-mark-mode 1)
;; 予約語を色分けする (global-font-lock-mode t)
;; C-x C-b でバッファリストを開く時に、ウィンドウを分割しない (global-set-key "\C-x\C-b" 'buffer-menu)
;; モードライン行の色の設定 ;; NTEmacs では設定しない方が格好いい(^^ゞ (set-face-foreground 'modeline "black") (set-face-background 'modeline "green")
;; directory list の設定 (Dired mode の時 [↑]キーでジャンプが選択できる) (setq file-name-history '("~/" "c:/cygwin/home" "c:/cygwin/usr/local"))
;; 対応する括弧にジャンプする (C-t にキーバインドしてます) ;; byte-compile するとエラーが出ますが、大丈夫でしょう。(^^ゞ (progn (defvar com-point nil "Remember com point as a marker. \(buffer specific\)") (set-default 'com-point (make-marker)) (defun getcom (arg) "Get com part of prefix-argument ARG." (cond ((null arg) nil) ((consp arg) (cdr arg)) (t nil))) (defun paren-match (arg) "Go to the matching parenthesis." (interactive "P") (let ((com (getcom arg))) (if (numberp arg) (if (or (> arg 99) (< arg 1)) (error "Prefix must be between 1 and 99.") (goto-char (if (> (point-max) 80000) (* (/ (point-max) 100) arg) (/ (* (point-max) arg) 100))) (back-to-indentation)) (cond ((looking-at "[\(\[{]") (if com (move-marker com-point (point))) (forward-sexp 1) (if com (paren-match nil com) (backward-char))) ((looking-at "[])}]") (forward-char) (if com (move-marker com-point (point))) (backward-sexp 1) (if com (paren-match nil com))) (t (error "")))))) (global-set-key "\C-t" 'paren-match))
;; タイトルバーに日時を表示する (setq display-time-day-and-date t display-time-12hr-format t) (setq display-time-string-forms '((if display-time-day-and-date (format "%s/%s/%s " year month day) "") (format "%s:%s%s" (if display-time-24hr-format 24-hours 12-hours) minutes (if display-time-24hr-format "" am-pm)))) (display-time) (cond (window-system (setq frame-title-format '((multiple-frames "") display-time-string)) (remove-hook 'global-mode-string 'display-time-string)))
;; カーソル行をウィンドウの1行目にする (C-x C-l にキーバインドしてます。) (defun line-to-top-of-window () "Move the line point is on to top of window." (interactive) (recenter 0)) (global-set-key "\C-x\C-l" 'line-to-top-of-window)
;; isearch に入った後、C-d と押すと次の一文字を拾ってきます。 ;; C-d と押した数だけ次の文字を拾ってきます。 ;; 白井さん作です。 (defun isearch-yank-char () "Pull next character from buffer into search string." (interactive) (isearch-yank-string (save-excursion (and (not isearch-forward) isearch-other-end (goto-char isearch-other-end)) (buffer-substring (point) (1+ (point)))))) (define-key isearch-mode-map "\C-d" 'isearch-yank-char)
行の折り返しを表す`\'を他の文字に変更する
1行で表示できない場合、行末に `$' や `\' が付くのですが、何となくいやなので、
`↓'に変更します。
他に、`^M' や `^L' などの `^'が上付きの `c'になります。
[meadow-users-jp: 3549]
で知りました。
ただし、bitmap-muleが必要です。
;; 行の折り返しを表す`\'を他の文字に変更する。 (defsubst set-standard-display-slot (slot glyph) (set-display-table-slot standard-display-table slot glyph)) (defsubst bitmap-compose-char (string) (string-to-char (bitmap-compose string))) (let ((slot-glyph-alist '((wrap . "00000808080808080808082A1C080000") (truncation . "0000000000002442FF42240000000000") (escape . "00001C223C201C000000000000000000") (control . "00001C222020221C0000000000000000"))) slot-glyph slot glyph) (while (setq slot-glyph (pop slot-glyph-alist)) (setq slot (car slot-glyph)) (setq glyph (bitmap-compose-char (cdr slot-glyph))) (set-standard-display-slot slot glyph)))
;; cursor の blink を止める (blink-cursor-mode 0)
;; active でない window の空 cursor を出さない (setq cursor-in-non-selected-windows nil)
(defvar init "~/.emacs.el") (and (boundp 'init) (stringp init) (file-newer-than-file-p init "~/.emacs.elc") (let ((mode-line-format "") (mode-line-inverse-video nil)) (message "wait! Your %s needs recompiling..." init) (sit-for 1) (byte-compile-file init) t) (kill-emacs))