changeset 52731:82315f163e1e

removed defadvice related code from ffap
author Rajesh Vaidheeswarran <rv@gnu.org>
date Thu, 02 Oct 2003 02:21:27 +0000
parents 7535333d9c75
children f282b28429c3
files lisp/ChangeLog lisp/ffap.el
diffstat 2 files changed, 8 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Oct 02 02:08:56 2003 +0000
+++ b/lisp/ChangeLog	Thu Oct 02 02:21:27 2003 +0000
@@ -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
--- a/lisp/ffap.el	Thu Oct 02 02:08:56 2003 +0000
+++ b/lisp/ffap.el	Thu Oct 02 02:21:27 2003 +0000
@@ -1249,9 +1249,7 @@
 ;; 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 @@
  (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)))
 
 
 ;;; Highlighting (`ffap-highlight'):