;;; ffap.el --- find file (or url) at point
-;; Copyright (C) 1995-1997, 2000-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1995-1997, 2000-2016 Free Software Foundation, Inc.
;; Author: Michelangelo Grigni <mic@mathcs.emory.edu>
;; Maintainer: emacs-devel@gnu.org
(defvaralias 'ffap-newsgroup-heads 'thing-at-point-newsgroup-heads)
(defalias 'ffap-newsgroup-p 'thing-at-point-newsgroup-p)
-(defsubst ffap-url-p (string)
+(defun ffap-url-p (string)
"If STRING looks like an URL, return it (maybe improved), else nil."
(when (and (stringp string) ffap-url-regexp)
(let* ((case-fold-search t)
(push (cons "" (cdr (assoc (match-string 0) ; i.e. "(TeX-current-macro)"
preferred-suffix-rules)))
guess-rules))
- (setq kpsewhich-args (mapcar (lambda (rule)
- (concat (car rule) name (cdr rule)))
- guess-rules))
(with-temp-buffer
(let ((process-environment (buffer-local-value
'process-environment curbuf))
(exec-path (buffer-local-value 'exec-path curbuf)))
- (apply #'call-process "kpsewhich" nil t nil kpsewhich-args))
+ (apply #'call-process "kpsewhich" nil t nil
+ (mapcar (lambda (rule)
+ (concat (car rule) name (cdr rule)))
+ guess-rules)))
(when (< (point-min) (point-max))
(buffer-substring (goto-char (point-min)) (point-at-eol))))))))