## Next
+* `company-clang` ObjC arguments template insertion now requires explicit user action.
* `company-clang-objc-templatify` does not insert spaces after colons anymore.
* `company-clang` is now only initialized in supported buffers.
So, no error messages if you don't have Clang until you open a C file.
"#]" " "
(replace-regexp-in-string "[<{[]#\\|#[>}]" "" meta t)
t))))
+ (common (and (derived-mode-p 'objc-mode)
+ (string-match ":" arg)
+ (substring arg 0 (match-beginning 0))))
(post-completion (and (derived-mode-p 'objc-mode)
(string-match ":" arg)
(company-clang-objc-templatify arg)))))
(push (cons company-prefix company-candidates) company-candidates-cache)
;; Calculate common.
(let ((completion-ignore-case (company-call-backend 'ignore-case)))
- (setq company-common (try-completion company-prefix company-candidates)))
+ (let ((common (try-completion company-prefix company-candidates)))
+ (setq company-common (or (company-call-backend 'common common)
+ common))))
(when (eq company-common t)
(setq company-candidates nil)))
(or (cdr candidates)
(not (eq t (compare-strings (car candidates) nil nil
prefix nil nil ignore-case)))))
- ;; Don't start when already completed and unique.
candidates
- ;; Not the right place? maybe when setting?
+ ;; Already completed and unique; don't start.
+ ;; FIXME: Not the right place? maybe when setting?
(and company-candidates t))))
(defun company-idle-begin (buf win tick pos)