Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote-tracking branch 'refs/remotes/m2ym/master'

  • Loading branch information...
commit c320e1cf2efa079e0d3577516f1662c4f96c1894 2 parents 3912fa2 + c2c1cc7
@purcell authored
Showing with 18 additions and 6 deletions.
  1. +13 −1 auto-complete-config.el
  2. +4 −4 auto-complete.el
  3. +1 −1  dict/ruby-mode
View
14 auto-complete-config.el
@@ -170,16 +170,27 @@
(defun ac-semantic-candidates (prefix)
(with-no-warnings
(delete "" ; semantic sometimes returns an empty string
- (mapcar 'semantic-tag-name
+ (mapcar '(lambda (elem)
+ (cons (semantic-tag-name elem)
+ (semantic-tag-clone elem)))
(ignore-errors
(or (semantic-analyze-possible-completions
(semantic-analyze-current-context))
(senator-find-tag-for-completion prefix)))))))
+(defun ac-semantic-doc (symbol)
+ (let* ((proto (semantic-format-tag-summarize-with-file symbol nil t))
+ (doc (semantic-documentation-for-tag symbol))
+ (res proto))
+ (when doc
+ (setq res (concat res "\n\n" doc)))
+ res))
+
(ac-define-source semantic
'((available . (or (require 'semantic-ia nil t)
(require 'semantic/ia nil t)))
(candidates . (ac-semantic-candidates ac-prefix))
+ (document . ac-semantic-doc)
(prefix . c-dot-ref)
(requires . 0)
(symbol . "m")))
@@ -188,6 +199,7 @@
'((available . (or (require 'semantic-ia nil t)
(require 'semantic/ia nil t)))
(candidates . (ac-semantic-candidates ac-prefix))
+ (document . ac-semantic-doc)
(symbol . "s")))
;; eclim
View
8 auto-complete.el
@@ -629,10 +629,10 @@ If there is no common part, this will be nil.")
(defun ac-mode-dictionary (mode)
(loop for name in (cons (symbol-name mode)
(ignore-errors (list (file-name-extension (buffer-file-name)))))
- for dir in ac-dictionary-directories
- for file = (concat dir "/" name)
- if (file-exists-p file)
- append (ac-file-dictionary file)))
+ append (loop for dir in ac-dictionary-directories
+ for file = (concat dir "/" name)
+ if (file-exists-p file)
+ append (ac-file-dictionary file))))
(defun ac-buffer-dictionary (&optional buffer)
(with-current-buffer (or buffer (current-buffer))
View
2  dict/ruby-mode
@@ -129,7 +129,7 @@ in
iterator?
lambda
load
-local_varaibles
+local_variables
loop
module
next
Please sign in to comment.
Something went wrong with that request. Please try again.