branch: elpa/slime
commit 19eac487f8be094ad144d9277afb5d26bbce3d11
Author: Stas Boukarev <stass...@gmail.com>
Commit: Stas Boukarev <stass...@gmail.com>

    Use comint-filename-completion instead of 
comint-replace-by-expanded-filename
    
    Fixes #886
---
 contrib/slime-c-p-c.el | 13 +------------
 slime.el               |  7 ++++---
 2 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/contrib/slime-c-p-c.el b/contrib/slime-c-p-c.el
index 45d0a40df1e..27bce0f6fae 100644
--- a/contrib/slime-c-p-c.el
+++ b/contrib/slime-c-p-c.el
@@ -27,24 +27,13 @@
   (:on-unload
    (while slime-c-p-c-init-undo-stack
      (eval (pop slime-c-p-c-init-undo-stack)))))
-
-(defun slime-maybe-complete-as-filename ()
-   "If point is at a string starting with \", complete it as filename.
- Return nil if point is not at filename."
-   (when (save-excursion (re-search-backward "\"[^ \t\n]+\\="
-                                            (max (point-min)
-                                                 (- (point) 1000)) t))
-     (let ((comint-completion-addsuffix '("/" . "\"")))
-      (comint-replace-by-expanded-filename)
-      t)))
 
 
 (defun slime-complete-symbol* ()
   "Expand abbreviations and complete the symbol at point."
   ;; NB: It is only the name part of the symbol that we actually want
   ;; to complete -- the package prefix, if given, is just context.
-  (if (slime-maybe-complete-as-filename)
-      nil
+  (or (slime-filename-completion)
       (slime-expand-abbreviations-and-complete)))
 
 (defun slime-c-p-c-completion-at-point ()
diff --git a/slime.el b/slime.el
index 3ce597f3aa0..255416f91e8 100644
--- a/slime.el
+++ b/slime.el
@@ -3627,9 +3627,10 @@ more than one space."
                          (cl-remove-if-not #'fboundp 
slime-completion-at-point-functions)))
                    (run-hook-with-args-until-success
                     'slime-completion-at-point-functions))))))
-    (if (and slime-fuzzy-default-completion-ui
-             fun
-             (symbolp fun))
+    (if (and fun
+             (symbolp fun)
+             (or slime-fuzzy-default-completion-ui
+                 (not (eq fun 'slime-fuzzy-complete-symbol))))
         (funcall fun)
         fun)))
 

Reply via email to