summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2006-02-17 21:54:17 +0000
committerJuri Linkov <juri@jurta.org>2006-02-17 21:54:17 +0000
commitdfe7296633a3b574b85adb0e47f2e0bcfee15efa (patch)
treeedadfbd2fab255c16023325e16807460abc1192f /lisp
parentbec275ed0a888ffdd01fdf3367ad0a3f6cac7853 (diff)
downloademacs-dfe7296633a3b574b85adb0e47f2e0bcfee15efa.tar.gz
(ffap) <defface>: Add explicit face declaration.
(ffap-highlight): Use face `ffap' directly instead of checking for its existence.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ffap.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 1b6665d16d5..8e30b44739f 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -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))))
;;; Main Entrance (`find-file-at-point' == `ffap'):