comint-replace-by-expanded-filename and Slime

Raymond Toy toy.raymond at gmail.com
Mon Aug 23 10:24:19 EDT 2010


 Slime has this function for expanding filenames in the slime repl:

(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."
  (if (save-excursion (re-search-backward "\"[^ \t\n]+\\=" (max (point-min)
                                                                (-
(point) 1000)) t))
      (let ((comint-completion-addsuffix '("/" . "\"")))
        (comint-replace-by-expanded-filename)
        t)
    nil))

This doesn't work.  I always get a error from
comint-replace-by-expanded-filename which says "last thing matched was
not a buffer".  I don't really understand what that means, but this
means filename completion doesn't work.

Looking at comint-replace-by-expanded-filename, I see a call to
replace-match, but that doesn't need a buffer does it?  It just needs
some match to so it knows what to replace.

Ray



More information about the XEmacs-Beta mailing list