emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: ffap highlighting persists


From: Juri Linkov
Subject: Re: ffap highlighting persists
Date: Thu, 09 Feb 2006 19:34:29 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Below is a patch that allows the user to turn off ffap highlighting.
Actually, it was possible to do this without this patch because
ffap.el checks for the face `ffap' with (facep 'ffap), but this
possibility is hidden from users.  A standard way to customize this
is to define faces with `defface':

Index: lisp/ffap.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/ffap.el,v
retrieving revision 1.54
diff -c -r1.54 ffap.el
*** lisp/ffap.el        6 Feb 2006 14:33:33 -0000       1.54
--- lisp/ffap.el        9 Feb 2006 17:33:38 -0000
***************
*** 1321,1326 ****
--- 1323,1334 ----
  (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,1351 ****
     (t
      (setq ffap-highlight-overlay
          (apply 'make-overlay ffap-string-at-point-region))
!     (overlay-put ffap-highlight-overlay 'face
!                     (if (facep 'ffap) 'ffap 'highlight)))))
  
  
  ;;; Main Entrance (`find-file-at-point' == `ffap'):
--- 1352,1358 ----
     (t
      (setq ffap-highlight-overlay
          (apply 'make-overlay ffap-string-at-point-region))
!     (overlay-put ffap-highlight-overlay 'face 'ffap))))
  
  
  ;;; Main Entrance (`find-file-at-point' == `ffap'):

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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