changeset 68982:72b641ca5ff3

(ffap) <defface>: Add explicit face declaration. (ffap-highlight): Use face `ffap' directly instead of checking for its existence.
author Juri Linkov <juri@jurta.org>
date Fri, 17 Feb 2006 21:54:17 +0000
parents 7a9fdd4e9317
children 064f4da012f5
files lisp/ffap.el
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ffap.el	Fri Feb 17 21:29:13 2006 +0000
+++ b/lisp/ffap.el	Fri Feb 17 21:54:17 2006 +0000
@@ -1321,6 +1321,12 @@
 (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 @@
    (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))))
 
 
 ;;; Main Entrance (`find-file-at-point' == `ffap'):