.emacs-my
changeset 1050 3fd11f075f60
parent 1049 154ab823d934
parent 1037 63dd116e3153
child 1051 1248821d9d0b
child 1054 144dcc473957
equal deleted inserted replaced
1049:154ab823d934 1050:3fd11f075f60
  1344   ;;         ("WAIT" . (:foreground "orange" :weight bold))
  1344   ;;         ("WAIT" . (:foreground "orange" :weight bold))
  1345   ;;         ("DONE" . (:foreground "green" :weight bold))) )
  1345   ;;         ("DONE" . (:foreground "green" :weight bold))) )
  1346   )
  1346   )
  1347 
  1347 
  1348 (setq org-agenda-include-diary t)
  1348 (setq org-agenda-include-diary t)
       
  1349 
       
  1350 (defun my-org-kill-by-tag (tag)
       
  1351   "Put all entries that matches TAG from current org-file to `kill-ring'."
       
  1352   (interactive (list (completing-read "Enter tag: " (org-get-buffer-tags))))
       
  1353   (kill-new "")
       
  1354   (org-scan-tags
       
  1355    (lambda ()
       
  1356      (let ( (last-command 'kill-region) )
       
  1357        (org-cut-subtree)))
       
  1358    '(member tag tags-list)
       
  1359    nil) )
  1349 
  1360 
  1350 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1361 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1351 (message "TODO, XXX, FIXME highlight")
  1362 (message "TODO, XXX, FIXME highlight")
  1352 ;; Show blanks and FIXME
  1363 ;; Show blanks and FIXME
  1353 ;; http://www.emacswiki.org/cgi-bin/wiki/EightyColumnRule
  1364 ;; http://www.emacswiki.org/cgi-bin/wiki/EightyColumnRule
  2098 ;; For debug use 'semantic-debug-idle-function' and 'semantic-debug-idle-work-function'.
  2109 ;; For debug use 'semantic-debug-idle-function' and 'semantic-debug-idle-work-function'.
  2099 
  2110 
  2100 (unless (featurep 'cedet)
  2111 (unless (featurep 'cedet)
  2101   (when (or
  2112   (when (or
  2102          (and (= emacs-major-version 23) (>= emacs-minor-version 2))
  2113          (and (= emacs-major-version 23) (>= emacs-minor-version 2))
  2103          (>= emacs-minor-version 24)
  2114          (>= emacs-major-version 24) )
  2104          )
       
  2105     (semantic-mode 1)
  2115     (semantic-mode 1)
  2106     ) )
  2116     ) )
  2107 
  2117 
  2108 (when (featurep 'srecode)
  2118 (when (featurep 'srecode)
  2109   (global-srecode-minor-mode 1))
  2119   (global-srecode-minor-mode 1))
  2110 
  2120 
  2111 (when (featurep 'cedet)
  2121 (when (featurep 'cedet)
  2112   (global-ede-mode t)
  2122   (global-semantic-idle-scheduler-mode 1)
  2113   (global-semantic-idle-summary-mode 1)
  2123   (global-semantic-idle-summary-mode 1)
  2114   (global-semantic-idle-scheduler-mode 1)
  2124   (global-semantic-idle-completions-mode 1)
  2115   (setq semantic-idle-scheduler-idle-time 1) ; 1 sec.
       
  2116   (global-semantic-decoration-mode 1)
  2125   (global-semantic-decoration-mode 1)
  2117   (global-semantic-mru-bookmark-mode 1)
  2126   (global-semantic-mru-bookmark-mode 1)
  2118   ;; (setq semantic-stickyfunc-sticky-classes '(function type variable include package))
  2127   ;; (setq semantic-stickyfunc-sticky-classes '(function type variable include package))
  2119   (global-semantic-stickyfunc-mode -1)
  2128   (global-semantic-stickyfunc-mode -1)
  2120   (global-semantic-idle-completions-mode -1)
  2129   (global-semantic-highlight-func-mode 1)
  2121 
  2130   (global-semantic-decoration-mode 1)
       
  2131   (global-semantic-idle-local-symbol-highlight-mode 1)
       
  2132 
       
  2133   (setq semantic-idle-scheduler-idle-time 1)
  2122   (setq semantic-idle-scheduler-work-idle-time 60)
  2134   (setq semantic-idle-scheduler-work-idle-time 60)
  2123   ;; (setq semantic-idle-work-parse-neighboring-files-flag nil)
  2135   ;; (setq semantic-idle-work-parse-neighboring-files-flag nil)
  2124 
  2136 
  2125   ;; semantic-dependency-system-include-path, semantic-customize-system-include-path
  2137   ;; semantic-dependency-system-include-path, semantic-customize-system-include-path
  2126 
  2138 
  2128   (setq-mode-local c-mode semanticdb-find-default-throttle '(file))
  2140   (setq-mode-local c-mode semanticdb-find-default-throttle '(file))
  2129   (add-hook 'c-mode-hook (lambda nil (semantic-add-system-include "~/.emacs.d/include" 'c-mode)))
  2141   (add-hook 'c-mode-hook (lambda nil (semantic-add-system-include "~/.emacs.d/include" 'c-mode)))
  2130   (add-hook 'c-mode-hook (lambda nil (semantic-add-system-include "~/.emacs.d/include" 'c++-mode)))
  2142   (add-hook 'c-mode-hook (lambda nil (semantic-add-system-include "~/.emacs.d/include" 'c++-mode)))
  2131   (global-semanticdb-minor-mode 1)
  2143   (global-semanticdb-minor-mode 1)
  2132 
  2144 
       
  2145   (global-ede-mode t)
       
  2146 
       
  2147   ;; (require 'semantic/db-javap)
       
  2148 
  2133   ;; (add-to-list 'ede-locate-setup-options 'ede-locate-idutils)
  2149   ;; (add-to-list 'ede-locate-setup-options 'ede-locate-idutils)
  2134   ;; (add-to-list 'ede-locate-setup-options 'ede-locate-global)
  2150   ;; (add-to-list 'ede-locate-setup-options 'ede-locate-global)
  2135 
  2151 
  2136   ;; (ignore-errors (require 'cedet-idutils))
  2152   ;; (ignore-errors (require 'cedet-idutils))
  2137   ;; (when (ignore-errors (require 'cedet-global))
  2153   ;; (when (ignore-errors (require 'cedet-global))
  2138   ;;   (semanticdb-enable-gnu-global-databases 'c-mode)
  2154   ;;   (semanticdb-enable-gnu-global-databases 'c-mode)
  2139   ;;   (semanticdb-enable-gnu-global-databases 'c++-mode)
  2155   ;;   (semanticdb-enable-gnu-global-databases 'c++-mode)
  2140   ;;   )
  2156   ;;   )
  2141 
  2157 
  2142   (global-set-key (kbd "C-c , .") 'semantic-ia-fast-jump)
  2158   (defun my-c-mode-cedet-hook ()
  2143   (global-set-key (kbd "C-c , d") 'semantic-ia-show-doc)
  2159     (local-set-key [C-return] 'semantic-complete-symbol)
  2144   (global-set-key (kbd "C-c , D") 'semantic-ia-describe-class)
  2160     ;; (local-set-key [C-return] 'semantic-complete-analyze-inline)
  2145   (global-set-key (kbd "C-c , c") 'semantic-ia-complete-symbol-menu)
  2161     (local-set-key "." 'semantic-complete-self-insert)
       
  2162     (local-set-key ">" 'semantic-complete-self-insert))
       
  2163   (add-hook 'c-mode-common-hook 'my-c-mode-cedet-hook)
       
  2164 
       
  2165   ;; (global-set-key (kbd "C-c , .") 'semantic-ia-fast-jump)
       
  2166   ;; (global-set-key (kbd "C-c , d") 'semantic-ia-show-doc)
       
  2167   ;; (global-set-key (kbd "C-c , D") 'semantic-ia-describe-class)
       
  2168   ;; (global-set-key (kbd "C-c , c") 'semantic-ia-complete-symbol-menu)
  2146   )
  2169   )
  2147 
  2170 
  2148 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2171 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2149 (message "imenu")
  2172 (message "imenu")
  2150 
  2173 
  2503 (setq nxml-sexp-element-flag t)
  2526 (setq nxml-sexp-element-flag t)
  2504 (setq nxml-child-indent 2)
  2527 (setq nxml-child-indent 2)
  2505 (setq nxml-attribute-indent 4)
  2528 (setq nxml-attribute-indent 4)
  2506 
  2529 
  2507 (add-to-list 'auto-mode-alist '("\.pom\\'" . nxml-mode))
  2530 (add-to-list 'auto-mode-alist '("\.pom\\'" . nxml-mode))
       
  2531 (add-to-list 'auto-mode-alist '("\.xsd\\'" . nxml-mode))
       
  2532 (add-to-list 'auto-mode-alist '("\.rng\\'" . nxml-mode))
  2508 
  2533 
  2509 (eval-after-load 'nxml-mode '(define-key nxml-mode-map [C-return] 'nxml-complete))
  2534 (eval-after-load 'nxml-mode '(define-key nxml-mode-map [C-return] 'nxml-complete))
  2510 
  2535 
  2511 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2536 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2512 (message "relax ng, rng")
  2537 (message "relax ng, rng")