]> code.delx.au - gnu-emacs/blobdiff - lisp/ffap.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / ffap.el
index 6c7932b512e252ce07101e5da58c9fb1b25c6dca..abf979f612933a224c5115dd9ae75384ab42b407 100644 (file)
@@ -974,14 +974,14 @@ out of NAME."
              (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))))))))