mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
removed defadvice related code from ffap
This commit is contained in:
parent
589e039f7a
commit
8daa9f3dd9
2 changed files with 8 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
14
lisp/ffap.el
14
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'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue