]> code.delx.au - gnu-emacs/blobdiff - lisp/ffap.el
(asm-mode, asm-mode-syntax-table): Add
[gnu-emacs] / lisp / ffap.el
index d487c4f67a043aa59a7dc706012c4cc701ff6fd6..5ff63bfdec2aff819213f62ec4b138d8b0b73c6d 100644 (file)
@@ -287,9 +287,9 @@ For a fancy alternative, get `ffap-url.el'."
 \f
 ;;; Compatibility:
 ;;
-;; This version of ffap supports Emacs 20 only, see the ftp site
-;; for a more general version.  The following functions are necessary
-;; "leftovers" from the more general version.
+;; This version of ffap supports only the Emacs it is distributed in.
+;; See the ftp site for a more general version.  The following
+;; functions are necessary "leftovers" from the more general version.
 
 (defun ffap-mouse-event nil            ; current mouse event, or nil
   (and (listp last-nonmenu-event) last-nonmenu-event))
@@ -730,7 +730,7 @@ kpathsea, a library used by some versions of TeX."
          path)))
 
 (defun ffap-locate-file (file &optional nosuffix path dir-ok)
-  ;; The Emacs 20 version of locate-library could almost replace this,
+  ;; The current version of locate-library could almost replace this,
   ;; except it does not let us override the suffix list.  The
   ;; compression-suffixes search moved to ffap-file-exists-string.
   "A generic path-searching function, mimics `load' by default.
@@ -1255,7 +1255,8 @@ which may actually result in an url rather than a filename."
                    (abbreviate-file-name (expand-file-name guess))
                    ))
          (setq dir (file-name-directory guess))))
-    (let ((minibuffer-completing-file-name t))
+    (let ((minibuffer-completing-file-name t)
+         (completion-ignore-case read-file-name-completion-ignore-case))
       (setq guess
            (completing-read
             prompt
@@ -1321,6 +1322,12 @@ which may actually result in an url rather than a filename."
 (defvar ffap-highlight t
   "If non-nil, ffap highlights the current buffer substring.")
 
+(defface ffap
+  '((t :inherit highlight))
+  "Face used to highlight the current buffer substring."
+  :group 'ffap
+  :version "22.1")
+
 (defvar ffap-highlight-overlay nil
   "Overlay used by `ffap-highlight'.")
 
@@ -1344,8 +1351,7 @@ Uses the face `ffap' if it is defined, or else `highlight'."
    (t
     (setq ffap-highlight-overlay
          (apply 'make-overlay ffap-string-at-point-region))
-    (overlay-put ffap-highlight-overlay 'face
-                     (if (facep 'ffap) 'ffap 'highlight)))))
+    (overlay-put ffap-highlight-overlay 'face 'ffap))))
 
 \f
 ;;; Main Entrance (`find-file-at-point' == `ffap'):