From: Rajesh Vaidheeswarran Date: Thu, 2 Oct 2003 02:21:27 +0000 (+0000) Subject: removed defadvice related code from ffap X-Git-Tag: ttn-vms-21-2-B4~8644 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8daa9f3dd9da8bd585c26db3a08f5db2aad11020;p=emacs.git removed defadvice related code from ffap --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ef0d80e9dba..8ef4f9b8090 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2003-10-01 Rajesh Vaidheeswarran + + * 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 * international/utf-8.el (ccl-decode-mule-utf-8): Lookup diff --git a/lisp/ffap.el b/lisp/ffap.el index 7b1853228a2..668700a5c1f 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -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))) ;;; Highlighting (`ffap-highlight'):