;;; ffap.el --- find file (or url) at point
;;
-;; Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 96, 97, 2000 Free Software Foundation, Inc.
;;
;; Author: Michelangelo Grigni <mic@mathcs.emory.edu>
;; Created: 29 Mar 1993
"\\`\\("
"news\\(post\\)?:\\|mailto:\\|file:" ; no host ok
"\\|"
- "\\(ftp\\|http\\|telnet\\|gopher\\|www\\|wais\\)://" ; needs host
+ "\\(ftp\\|https?\\|telnet\\|gopher\\|www\\|wais\\)://" ; needs host
"\\)." ; require one more character
)
"Regexp matching URL's. nil to disable URL features in ffap.")
;;
;; Based on overlay highlighting in Emacs 19.28 isearch.el.
-(defvar ffap-highlight (and window-system t)
+(defvar ffap-highlight t
"If non-nil, ffap highlights the current buffer substring.")
(defvar ffap-highlight-overlay nil
(setq ffap-highlight-overlay
(apply 'make-overlay ffap-string-at-point-region))
(overlay-put ffap-highlight-overlay 'face
- (if (internal-find-face 'ffap)
- 'ffap 'highlight)))))
+ (if (facep 'ffap) 'ffap 'highlight)))))
\f
;;; Main Entrance (`find-file-at-point' == `ffap'):
(defvar ffap-menu-text-plist
(cond
- ((not window-system) nil)
- (t '(face bold mouse-face highlight))) ; keymap <mousy-map>
+ ((display-mouse-p) '(face bold mouse-face highlight)) ; keymap <mousy-map>
+ (t nil))
"Text properties applied to strings found by `ffap-menu-rescan'.
These properties may be used to fontify the menu references.")