;;; semantic/analyze/complete.el --- Smart Completions
-;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
Argument CONTEXT is an object specifying the locally derived context.
The optional argument FLAGS changes which return options are returned.
FLAGS can be any number of:
- 'no-tc - do not apply data-type constraint.
- 'no-unique - do not apply unique by name filtering."
+ 'no-tc - do not apply data-type constraint.
+ 'no-longprefix - ignore long multi-symbol prefixes.
+ 'no-unique - do not apply unique by name filtering."
(let* ((a context)
(desired-type (semantic-analyze-type-constraint a))
(desired-class (oref a prefixclass))
(c nil)
(any nil)
(do-typeconstraint (not (memq 'no-tc flags)))
+ (do-longprefix (not (memq 'no-longprefix flags)))
(do-unique (not (memq 'no-unique flags)))
)
+ (when (not do-longprefix)
+ ;; If we are not doing the long prefix, shorten all the key
+ ;; elements.
+ (setq prefix (list (car (reverse prefix)))
+ prefixtypes nil))
+
;; Calculate what our prefix string is so that we can
;; find all our matching text.
(setq completetext (car (reverse prefix)))