]> code.delx.au - gnu-emacs/commitdiff
* lisp/ffap.el (ffap-latex-mode): Avoid free variable.
authorGlenn Morris <rgm@gnu.org>
Fri, 8 Jan 2016 21:28:09 +0000 (16:28 -0500)
committerGlenn Morris <rgm@gnu.org>
Fri, 8 Jan 2016 21:28:09 +0000 (16:28 -0500)
lisp/ffap.el

index 543b3b2e0b7a3f4f0ef8d118d48912e588c264af..36727b3747d44b71f7cca9d4dd3e6ac44ea411b0 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))))))))