- 论坛徽章:
- 0
|
对于自定义的结构体成员, 能很好的补全, 可是对于系统的结构体成员, 则每次弹出的补全选项都是一样的.如图.
.emacs 中的配置完全照这里写的http://www.caole.net/diary/emacs_write_cpp.html
- ;;---------------------------------------------------
- ;;cedet 安装
- (add-hook 'texinfo-mode-hook (lambda () (require 'sb-texinfo)))
- (load-file "~/.myemacs/cedet-1.0pre4/common/cedet.el")
- (semantic-load-enable-code-helpers)
- (autoload 'speedbar-frame-mode "speedbar" "Popup a speedbar frame" t)
- (autoload 'speedbar-get-focus "speedbar" "Jump to speedbar frame" t)
- (define-key-after (lookup-key global-map [menu-bar tools])
- [speedbar]
- '("Speedbar" .
- speedbar-frame-mode)
- [calendar])
- ;----------------------------------------------------------
- ;;ecb
- (add-to-list 'load-path "~/.myemacs/ecb-2.32")
- (load-file "~/.myemacs/ecb-2.32/ecb.el")
- (require 'ecb)
- (setq ecb-auto-activate t
- ecb-tip-of-the-day nil
- ecb-tree-indent 4
- ecb-windows-height 0.5
- ecb-windows-width 0.13)
- ecb-auto-compatibility-check nil
- ecb-version-check nil
- inhibit-startup-message t
- ;--------------------------------------------
- (custom-set-variables
- ;; custom-set-variables was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- '(column-number-mode t)
- '(display-time-mode t)
- '(ecb-options-version "2.32")
- '(ecb-source-path (quote ("/a/src" "/home/pro21ms4")))
- '(show-paren-mode t)
- '(tabbar-buffer-groups-function (quote tabbar-buffer-ignore-groups))
- '(tabbar-buffer-list-function (quote tabbar-buffer-list))
- '(tabbar-cycling-scope nil)
- '(tabbar-mode t)
- '(transient-mark-mode t))
- (custom-set-faces
- ;; custom-set-faces was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- )
- ;----------------------------------------------
- (setq semanticdb-project-roots
- (list
- (expand-file-name "/")))
- (defun my-indent-or-complete ()
- (interactive)
- (if (looking-at "\\>")
- (hippie-expand nil)
- (indent-for-tab-command))
- )
- (global-set-key [(control tab)] 'my-indent-or-complete)
- (autoload 'senator-try-expand-semantic "senator")
- (setq hippie-expand-try-functions-list
- '(
- senator-try-expand-semantic
- try-expand-dabbrev
- try-expand-dabbrev-visible
- try-expand-dabbrev-all-buffers
- try-expand-dabbrev-from-kill
- try-expand-list
- try-expand-list-all-buffers
- try-expand-line
- try-expand-line-all-buffers
- try-complete-file-name-partially
- try-complete-file-name
- try-expand-whole-kill
- )
- )
复制代码
[ 本帖最后由 pro21ms4 于 2007-7-27 18:16 编辑 ] |
|