emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/ffap.el


From: Rajesh Vaidheeswarran
Subject: [Emacs-diffs] Changes to emacs/lisp/ffap.el
Date: Wed, 01 Oct 2003 22:21:28 -0400

Index: emacs/lisp/ffap.el
diff -c emacs/lisp/ffap.el:1.39 emacs/lisp/ffap.el:1.40
*** emacs/lisp/ffap.el:1.39     Tue Sep 30 08:49:04 2003
--- emacs/lisp/ffap.el  Wed Oct  1 22:21:27 2003
***************
*** 1249,1257 ****
  ;; 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.
  
  (defun ffap-complete-as-file-p nil
    ;; Will `minibuffer-completion-table' complete the minibuffer
--- 1249,1255 ----
  ;; 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.
  
  (defun ffap-complete-as-file-p nil
    ;; Will `minibuffer-completion-table' complete the minibuffer
***************
*** 1265,1279 ****
   (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))))
  
  
  ;;; Highlighting (`ffap-highlight'):
--- 1263,1269 ----
   (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)))
  
  
  ;;; Highlighting (`ffap-highlight'):




reply via email to

[Prev in Thread] Current Thread [Next in Thread]