Subject: 27.0.50; ediff-files does not work after lexical-binding was enabled for ediff
From: Kaushal Modi <[email-masked]>
To: [email-masked]
Date: Sun, 9 Jun 2019 23:11:48 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

X-Debbugs-CC:  [email-masked]

Hello,

After lexical-binding was enabled in ediff, doing ediff-files gives this
error:

Debugger entered--Lisp error: (void-variable file-A)
  ediff-find-file(file-A buf-A ediff-last-dir-A startup-hooks)
  ediff-files-internal("~/temp/d" "~/temp/a" nil nil ediff-files)
  ediff-files("~/temp/d" "~/temp/a")
  eval((ediff-files "~/temp/d" "~/temp/a") t)
  eval-expression((ediff-files "~/temp/d" "~/temp/a") nil nil 127)
  funcall-interactively(eval-expression (ediff-files "~/temp/d" "~/temp/a")
nil nil 127)
  call-interactively(eval-expression nil nil)
  command-execute(eval-expression)

Recipe:

Take any 2 files and do M-: (ediff-files "file1" "file2")

Commit:
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=963d4e24263b0ff2add1a223f00387ca53d0658f

In GNU Emacs 27.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 2.24.23)
 of 2019-06-09
Repository revision: e4f12a1b1ffba07cc7d6f6e1aec5de9f09af616f
Repository branch: master
Windowing system distributor 'Open Text', version 11.0.11505
System Description: Red Hat Enterprise Linux Workstation release 6.8
(Santiago)

Configured using:
 'configure --with-modules --with-imagemagick
 --prefix=/home/kmodi/usr_local/apps/6/emacs/master
 '--program-transform-name=s/^ctags$/ctags_emacs/' --with-harfbuzz
 --enable-checking=yes,glyphs --enable-check-lisp-object-type
 'CPPFLAGS=-I/home/kmodi/stowed/include
 -I/cad/adi/apps/gnu/linux/x86_64/6/include/
 -I/home/kmodi/usr_local/6/include -I/usr/include/freetype2
 -I/usr/include' 'CFLAGS=-ggdb3 -Og' 'CXXFLAGS=-ggdb3 -Og'
 'LDFLAGS=-L/home/kmodi/stowed/lib -L/home/kmodi/stowed/lib64
 -L/cad/adi/apps/gnu/linux/x86_64/6/lib/ -L/home/kmodi/usr_local/6/lib
 -L/home/kmodi/usr_local/6/lib64 -ggdb3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT
LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11 XDBE XIM MODULES THREADS
PDUMPER GMP

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

--
Kaushal Modi