]> git.eshelyaron.com Git - emacs.git/commitdiff
(ffap) <defface>: Add explicit face declaration.
authorJuri Linkov <juri@jurta.org>
Fri, 17 Feb 2006 21:54:17 +0000 (21:54 +0000)
committerJuri Linkov <juri@jurta.org>
Fri, 17 Feb 2006 21:54:17 +0000 (21:54 +0000)
(ffap-highlight): Use face `ffap' directly instead of checking
for its existence.

lisp/ffap.el

index 1b6665d16d53981cb525853ccebe0d7d128e96f1..8e30b44739f34798bbf2a55eeb17aa59968d2729 100644 (file)
@@ -1321,6 +1321,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 +1350,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'):