# HG changeset patch # User Oleksandr Gavenko # Date 1255892302 -10800 # Node ID 29dc0658b75d68f7093a1e799a5dfa03c0910daf # Parent 6454364c25cf1c1cc58e2cfb079ed97024f63f61# Parent 2f2aae1d394c9e536c8989f63d4f6251b11a0006 merged diff -r 2f2aae1d394c -r 29dc0658b75d .emacs-my --- a/.emacs-my Mon Oct 05 23:08:41 2009 +0300 +++ b/.emacs-my Sun Oct 18 21:58:22 2009 +0300 @@ -12,8 +12,7 @@ ;; ====================================================================== ;; Debugging. -;; Shut off message buffer by setting nil. Note - if you need to debug emacs, -;; comment these out so you can see what's going on. +;; Shut off message buffer by setting nil. (setq message-log-max 100) ;;(add-hook 'after-init-hook @@ -44,6 +43,7 @@ ;; курсор не мигает! ;; (blink-cursor-mode nil) ;; (set-face-font 'default "7x14") + (fringe-mode 'default) ) ;; Для tty (progn @@ -63,6 +63,10 @@ ;; (require 'gnuserv) ;; (setq gnuserv-frame (selected-frame)) +(require 'server) +(when (and (= emacs-major-version 23) (equal window-system 'w32)) + (defun server-ensure-safe-dir (dir) "Noop" t)) ; Suppress error directory ~/.emacs.d/server is unsafe on windows. + (server-start) ;; (desktop-load-default) @@ -81,6 +85,9 @@ (setq frame-title-format "Emacs - %b") +;; Always end a file with a newline. +;; (setq require-final-newline t) + (setq read-quoted-char-radix 16) ;; ---------------------------------------------------------------------- @@ -117,9 +124,6 @@ ) ;; ---------------------------------------------------------------------- -;; fringe-mode - -;; ---------------------------------------------------------------------- ;; *Text* (setq default-major-mode 'text-mode) @@ -400,8 +404,6 @@ ;; ====================================================================== ;; *auto-fill* -;; To enable/disable auto-fill mode type ESC M-f. - (setq-default fill-column 78) ;; By default used American convention - sentence and with two spaces. Change @@ -453,7 +455,6 @@ ;; (desire 'abbrev) ;; (desire 'bibtex) ;; (desire 'calc) -;; (desire 'cc-mode) ;; (desire 'ediff) ;; (desire 'eiffel-mode) ;; (desire 'emacs-w3m) @@ -724,6 +725,10 @@ ) ) +;; fsm used in emacs jabber +(when (featurep 'fsm) + (setq fsm-debug nil) ; Disable *fsm-debug* buffer. + ) ;; ---------------------------------------------------------------------- ;; rcirc @@ -789,7 +794,9 @@ (add-to-list 'auto-mode-alist '("\\.cu$" . c-mode)) -(setq comment-style (quote indent)) +(setq-default comment-style (quote indent)) +(setq-default comment-column 44) +(setq-default comment-fill-column 100) (setq-default show-trailing-whitespace t) @@ -840,13 +847,24 @@ ;; (setq-default asm-comment-char 59) (add-hook 'asm-mode-hook '(lambda () (setq comment-start "/*") (setq comment-end "*/")) t) +;; (add-hook 'asm-mode-hook '(lambda () (local-unset-key ":"))) +;; (add-hook 'asm-mode-hook '(lambda () (local-set-key ":" ":"))) + ;; ---------------------------------------------------------------------- ;; LISP (setq list-command-history-max 256) ;; ---------------------------------------------------------------------- -;; C, c-lang +;; C, c-mode, C++, c++-mode + (setq c-echo-syntactic-information-p t) +(add-hook 'c-mode-common-hook + (lambda () + ;; Automatically inserte newlines after special characters such as brace, comma, semi-colon, and colon. + (c-toggle-auto-newline -1) + ;; Delete all preceding whitespace by DEL. + (c-toggle-hungry-state -1) + )) (defconst my-c-style '((c-tab-always-indent . t) @@ -890,24 +908,9 @@ (c-echo-syntactic-information-p . t)) "My C Programming Style") -;; (objc-mode . "my-mode") (c++-mode . "cc-mode") (add-hook 'c-mode-common-hook (lambda () (c-add-style "my" my-c-style t))) -(setq c-default-style '((java-mode . "my") (c-mode . "my") (csharp-mode . "my") (other . "my"))) - -;; Customizations for all modes in CC Mode. -;; (defun my-c-mode-common-hook () -;; ;; add my personal style and set it for the current buffer -;; (c-add-style "PERSONAL" my-c-style t) -;; ;; other customizations -;; ;; we like auto-newline and hungry-delete -;; (c-toggle-auto-hungry-state 1) -;; ;; key bindings 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, idl-mode-map, and pike-mode-map inherit from it. -;; (define-key c-mode-base-map "\C-m" 'c-context-line-break)) - -;; (add-hook 'c-mode-common-hook 'my-c-mode-common-hook) +(setq c-default-style '((java-mode . "my") (c-mode . "my") (csharp-mode . "my") (c++-mode . "my") (objc-mode . "my") (other . "my"))) ;; ---------------------------------------------------------------------- ;; *csharp*, c-sharp