+2003-10-01 Rajesh Vaidheeswarran <rv@gnu.org>
+
+ * ffap.el: Remove defadvice related code from CVS since
+ `complete' provides a `PC-completion-as-file-name-predicate'
+ variable that ffap can override.
+
2003-10-02 Kenichi Handa <handa@m17n.org>
* international/utf-8.el (ccl-decode-mule-utf-8): Lookup
;; This code assumes that you load ffap.el after complete.el.
;;
;; We must inform complete about whether our completion function
-;; will do filename style completion. For earlier versions of
-;; complete.el, this requires a defadvice. For recent versions
-;; there may be a special variable for this purpose.
+;; will do filename style completion.
(defun ffap-complete-as-file-p nil
;; Will `minibuffer-completion-table' complete the minibuffer
(featurep 'complete)
(if (boundp 'PC-completion-as-file-name-predicate)
;; modern version of complete.el, just set the variable:
- (setq PC-completion-as-file-name-predicate 'ffap-complete-as-file-p)
- (require 'advice)
- (defadvice PC-do-completion (around ffap-fix act)
- "Work with ffap."
- (let ((minibuffer-completion-table
- (if (eq t (ffap-complete-as-file-p))
- 'read-file-name-internal
- minibuffer-completion-table)))
- ad-do-it))))
+ (setq PC-completion-as-file-name-predicate 'ffap-complete-as-file-p)))
\f
;;; Highlighting (`ffap-highlight'):