]> code.delx.au - gnu-emacs/blobdiff - lisp/obsolete/sym-comp.el
; Auto-commit of loaddefs files.
[gnu-emacs] / lisp / obsolete / sym-comp.el
index 85d427a3317d27e6de608979dfe0738b3b50899f..c2eab2c260ad8a0f96d273bd55e8743d681d1813 100644 (file)
@@ -1,6 +1,6 @@
 ;;; 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
@@ -139,16 +139,23 @@ to be set buffer-locally.  Variables `symbol-completion-symbol-function',
                                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)
@@ -158,9 +165,9 @@ Uses `symbol-completion-symbol-function' and
 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)