]> git.eshelyaron.com Git - emacs.git/commitdiff
removed defadvice related code from ffap
authorRajesh Vaidheeswarran <rv@gnu.org>
Thu, 2 Oct 2003 02:21:27 +0000 (02:21 +0000)
committerRajesh Vaidheeswarran <rv@gnu.org>
Thu, 2 Oct 2003 02:21:27 +0000 (02:21 +0000)
lisp/ChangeLog
lisp/ffap.el

index ef0d80e9dbae085e2dc9926536d628412a7d7a5b..8ef4f9b80906bf4a5fd05026f32bb08857b9c254 100644 (file)
@@ -1,3 +1,9 @@
+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
index 7b1853228a21406965327c3de46c8e6339628407..668700a5c1f23d57eaa547a2e19bff0e48c8e2a3 100644 (file)
@@ -1249,9 +1249,7 @@ which may actually result in an url rather than a filename."
 ;; 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
@@ -1265,15 +1263,7 @@ which may actually result in an url rather than a filename."
  (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'):