;;; sym-comp.el --- mode-dependent symbol completion
-;; Copyright (C) 2004, 2008-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2008-2016 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: extensions
pattern))
;; In case the transform needs to access it.
(symbol-completion-predicate predicate)
- (completion-annotate-function
+ (completion-extra-properties
(if (functionp symbol-completion-transform-function)
- (lambda (str)
- (car-safe (cdr-safe
- (funcall symbol-completion-transform-function
- str)))))))
+ '(:annotation-function
+ (lambda (str)
+ (car-safe (cdr-safe
+ (funcall symbol-completion-transform-function
+ str))))))))
(completion-in-region (- (point) (length pattern)) (point)
completions predicate)))
\f
-(eval-when-compile (require 'hippie-exp))
+(defvar he-search-string)
+(defvar he-tried-table)
+(defvar he-expand-list)
+(declare-function he-init-string "hippie-exp" (beg end))
+(declare-function he-string-member "hippie-exp" (str lst &optional trans-case))
+(declare-function he-substitute-string "hippie-exp" (str &optional trans-case))
+(declare-function he-reset-string "hippie-exp" ())
;;;###autoload
(defun symbol-completion-try-complete (old)
used something like this in a major mode which provides symbol
completion:
- (if (featurep 'hippie-exp)
- (set (make-local-variable 'hippie-expand-try-functions-list)
- (cons 'symbol-completion-try-complete
+ (if (featurep \\='hippie-exp)
+ (set (make-local-variable \\='hippie-expand-try-functions-list)
+ (cons \\='symbol-completion-try-complete
hippie-expand-try-functions-list)))"
(when (and symbol-completion-symbol-function
symbol-completion-completions-function)