# HG changeset patch # User Oleksandr Gavenko # Date 1280096071 -10800 # Node ID 16e7a5a565a987225d95fa77a538bb7bc6d91312 # Parent 7a06c31e9c099bcba1569d6971d164a0aa2fd739# Parent 998f33a8ec6e5b3c7f5843900cbc2acaaa48fd12 merged diff -r 7a06c31e9c09 -r 16e7a5a565a9 .emacs-my --- a/.emacs-my Sat Jul 24 14:25:26 2010 +0300 +++ b/.emacs-my Mon Jul 26 01:14:31 2010 +0300 @@ -34,7 +34,9 @@ "List of development modes.") (defvar my-devel-mode-hook-list - '(sh-mode-hook script-mode-hook + '( + outline-mode-hook + sh-mode-hook script-mode-hook c-mode-hook c++-mode-hook java-mode-hook python-mode-hook makefile-mode-hook makefile-gmake-mode-hook @@ -90,6 +92,12 @@ (menu-bar-mode -1) (tool-bar-mode -1) (when window-system + (defun my-popup-menu () + (interactive) + (popup-menu + (mouse-menu-bar-map) ;; (mouse-menu-major-mode-map) + (list (list (/ (display-pixel-width) 2) 10) (get-buffer-window (buffer-name))))) + (global-set-key [f10] 'my-popup-menu) (when (>= emacs-major-version 22) (tooltip-mode -1)) (scroll-bar-mode 1) ) @@ -888,10 +896,12 @@ my-devel-mode-hook-list) ;; ---------------------------------------------------------------------- -;; diff, patch. +;; diff, patch, ediff, emerge. (setq diff-switches "-u") +(setq ediff-diff-options "") + ;; ---------------------------------------------------------------------- ;; indenting. @@ -913,11 +923,6 @@ (setq i (- i 4)))) ;; ---------------------------------------------------------------------- -;; diff. - -(setq ediff-diff-options "") - -;; ---------------------------------------------------------------------- ;; *Compile* (setq compile-auto-highlight t @@ -935,6 +940,48 @@ ;; (add-to-list 'compilation-mode-font-lock-keywords '("[ ]\\(/F[oe][^ ]+\\)" . 1)) ;; ---------------------------------------------------------------------- +;; TAGS, etags, ctags, GNU GLOBAL. + +(when (featurep 'etags-table) + (setq etags-table-search-up-depth 1) + ) + +;; ---------------------------------------------------------------------- +;; CEDET, semantic. + +;; For debug use 'semantic-debug-idle-function' and 'semantic-debug-idle-work-function'. +(when (or (and (= emacs-major-version 23) (= emacs-minor-version 2)) + (>= emacs-minor-version 24)) + (semantic-mode 1) + (global-semantic-idle-summary-mode 1) + (global-semantic-idle-scheduler-mode 1) + (setq semantic-idle-scheduler-idle-time 1) ; 1 sec. + (global-semanticdb-minor-mode 1) + (global-semantic-decoration-mode 1) + (global-semantic-mru-bookmark-mode 1) + ;; (global-semantic-idle-completions-mode -1) + ;; (global-semantic-stickyfunc-mode 1) + ;; (setq semantic-stickyfunc-sticky-classes '(function type variable include package)) + + ;; (semantic-add-system-include "~/include" 'c++-mode) + ;; (semantic-add-system-include "~/include" 'c-mode) + ) + +;; ---------------------------------------------------------------------- +;; imenu. + +(require 'imenu) +(when window-system + (mapc (lambda (hook) + (add-hook hook + (lambda () + (imenu-add-menubar-index) + (run-hooks 'menu-bar-update-hook) + ) )) + my-devel-mode-hook-list) + ) + +;; ---------------------------------------------------------------------- ;; windows inf files for driver installing (add-to-list 'auto-mode-alist '("\\.inf\\'" . conf-mode)) @@ -1024,9 +1071,20 @@ (c-echo-syntactic-information-p . t)) "My C Programming Style") -(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") (c++-mode . "my") (objc-mode . "my") (other . "my"))) +(add-hook + 'c-mode-common-hook + '(lambda () + (c-add-style "my" my-c-style t) + ;; If set 'c-default-style' before 'c-add-style' + ;; "Undefined style: my" error occured from 'c-get-style-variables'. + (setq c-default-style + '( + (java-mode . "my") (c-mode . "my") (csharp-mode . "my") (c++-mode . "my") (objc-mode . "my") + (awk-mode . "awk") + (other . "my") + )) + )) + ;; ---------------------------------------------------------------------- ;; bat file, batch, loaded from 'generic-x.el'. @@ -1057,11 +1115,6 @@ ;; (add-to-list 'load-path (expand-file-name "~/emacs/site/eieio")) ;; (add-to-list 'load-path (expand-file-name "~/emacs/site/jde-2.3.5.1/lisp")) -;; Load CEDET -;; (load-file "~/emacs/site/common/cedet.el") -;; Enabling SEMANTIC minor modes. See semantic/INSTALL for more ideas. -;; (semantic-load-enable-code-helpers) - ;; If you want Emacs to defer loading the JDE until you open a ;; Java file, edit the following line ;; (setq defer-loading-jde nil)