aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajesh Vaidheeswarran2003-10-02 02:21:27 +0000
committerRajesh Vaidheeswarran2003-10-02 02:21:27 +0000
commit8daa9f3dd9da8bd585c26db3a08f5db2aad11020 (patch)
treec94d53f38def571edd53b919471af85f545ac488
parent589e039f7a72125ca4ce72a9c0f2e589ed957e8e (diff)
downloademacs-8daa9f3dd9da8bd585c26db3a08f5db2aad11020.tar.gz
emacs-8daa9f3dd9da8bd585c26db3a08f5db2aad11020.zip
removed defadvice related code from ffap
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/ffap.el14
2 files changed, 8 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ef0d80e9dba..8ef4f9b8090 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12003-10-01 Rajesh Vaidheeswarran <rv@gnu.org>
2
3 * ffap.el: Remove defadvice related code from CVS since
4 `complete' provides a `PC-completion-as-file-name-predicate'
5 variable that ffap can override.
6
12003-10-02 Kenichi Handa <handa@m17n.org> 72003-10-02 Kenichi Handa <handa@m17n.org>
2 8
3 * international/utf-8.el (ccl-decode-mule-utf-8): Lookup 9 * 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."
1249;; This code assumes that you load ffap.el after complete.el. 1249;; This code assumes that you load ffap.el after complete.el.
1250;; 1250;;
1251;; We must inform complete about whether our completion function 1251;; We must inform complete about whether our completion function
1252;; will do filename style completion. For earlier versions of 1252;; will do filename style completion.
1253;; complete.el, this requires a defadvice. For recent versions
1254;; there may be a special variable for this purpose.
1255 1253
1256(defun ffap-complete-as-file-p nil 1254(defun ffap-complete-as-file-p nil
1257 ;; Will `minibuffer-completion-table' complete the minibuffer 1255 ;; Will `minibuffer-completion-table' complete the minibuffer
@@ -1265,15 +1263,7 @@ which may actually result in an url rather than a filename."
1265 (featurep 'complete) 1263 (featurep 'complete)
1266 (if (boundp 'PC-completion-as-file-name-predicate) 1264 (if (boundp 'PC-completion-as-file-name-predicate)
1267 ;; modern version of complete.el, just set the variable: 1265 ;; modern version of complete.el, just set the variable:
1268 (setq PC-completion-as-file-name-predicate 'ffap-complete-as-file-p) 1266 (setq PC-completion-as-file-name-predicate 'ffap-complete-as-file-p)))
1269 (require 'advice)
1270 (defadvice PC-do-completion (around ffap-fix act)
1271 "Work with ffap."
1272 (let ((minibuffer-completion-table
1273 (if (eq t (ffap-complete-as-file-p))
1274 'read-file-name-internal
1275 minibuffer-completion-table)))
1276 ad-do-it))))
1277 1267
1278 1268
1279;;; Highlighting (`ffap-highlight'): 1269;;; Highlighting (`ffap-highlight'):