comparison lisp/cedet/semantic.el @ 108166:15deb8699a13

* minibuffer.el (tags-completion-at-point-function): New function. (completion-at-point-functions): Use it. * cedet/semantic.el (semantic-completion-at-point-function): New function. (semantic-mode): Use semantic-completion-at-point-function for completion-at-point-functions instead. * progmodes/etags.el (complete-tag): Revert last change.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 29 Apr 2010 11:32:11 -0400
parents 56d11bda8235
children 280c8ae2476d
comparison
equal deleted inserted replaced
108165:5f43377338a0 108166:15deb8699a13
1081 (semanticdb-load-ebrowse-caches))) 1081 (semanticdb-load-ebrowse-caches)))
1082 (add-hook 'mode-local-init-hook 'semantic-new-buffer-fcn) 1082 (add-hook 'mode-local-init-hook 'semantic-new-buffer-fcn)
1083 ;; Add semantic-ia-complete-symbol to 1083 ;; Add semantic-ia-complete-symbol to
1084 ;; completion-at-point-functions, so that it is run from 1084 ;; completion-at-point-functions, so that it is run from
1085 ;; M-TAB. 1085 ;; M-TAB.
1086 (add-hook 'completion-at-point-functions 'semantic-ia-complete-symbol) 1086 (add-hook 'completion-at-point-functions
1087 'semantic-completion-at-point-function)
1087 (if global-ede-mode 1088 (if global-ede-mode
1088 (define-key cedet-menu-map [cedet-menu-separator] '("--"))) 1089 (define-key cedet-menu-map [cedet-menu-separator] '("--")))
1089 (dolist (b (buffer-list)) 1090 (dolist (b (buffer-list))
1090 (with-current-buffer b 1091 (with-current-buffer b
1091 (semantic-new-buffer-fcn)))) 1092 (semantic-new-buffer-fcn))))
1092 ;; Disable all Semantic features. 1093 ;; Disable all Semantic features.
1093 (remove-hook 'mode-local-init-hook 'semantic-new-buffer-fcn) 1094 (remove-hook 'mode-local-init-hook 'semantic-new-buffer-fcn)
1094 (remove-hook 'completion-at-point-functions 'semantic-ia-complete-symbol) 1095 (remove-hook 'completion-at-point-functions
1096 'semantic-completion-at-point-function)
1095 (define-key cedet-menu-map [cedet-menu-separator] nil) 1097 (define-key cedet-menu-map [cedet-menu-separator] nil)
1096 (define-key cedet-menu-map [semantic-options-separator] nil) 1098 (define-key cedet-menu-map [semantic-options-separator] nil)
1097 ;; FIXME: handle semanticdb-load-ebrowse-caches 1099 ;; FIXME: handle semanticdb-load-ebrowse-caches
1098 (dolist (mode semantic-submode-list) 1100 (dolist (mode semantic-submode-list)
1099 (if (and (boundp mode) (eval mode)) 1101 (if (and (boundp mode) (eval mode))
1100 (funcall mode -1))))) 1102 (funcall mode -1)))))
1101 1103
1104 (defun semantic-completion-at-point-function ()
1105 'semantic-ia-complete-symbol)
1106
1102 ;;; Autoload some functions that are not in semantic/loaddefs 1107 ;;; Autoload some functions that are not in semantic/loaddefs
1103 1108
1104 (autoload 'global-semantic-idle-completions-mode "semantic/idle" 1109 (autoload 'global-semantic-idle-completions-mode "semantic/idle"
1105 "Toggle global use of `semantic-idle-completions-mode'. 1110 "Toggle global use of `semantic-idle-completions-mode'.
1106 If ARG is positive, enable, if it is negative, disable. 1111 If ARG is positive, enable, if it is negative, disable.