Subject: bug#23293: 24.5; Error with directory local variables

From: Jon Schewe <[email-masked]>
Date: Thu, 14 Apr 2016 14:48:50 -0500

I downloaded log4cplus from SourceForge. In it's top level directory is
the file .dir-locals.el with the following contents:
;;; Directory Local Variables
;;; See Info node `(emacs) Directory Variables' for more information.

((nil .
  ((fill-column . 79)
   (indent-tabs-mode)
   (show-trailing-whitespace . t)
   (whitespace-style face trailing lines-tail space-before-tab indentation empty)
   (whitespace-newline . t)))
 (c++-mode .
  ((tab-width . 4)
   (whitespace-action warn-read-only auto-cleanup)))
 (cmake-mode .
  ((whitespace-action warn-read-only auto-cleanup))))

When I try to navigate to that directory with dired I get prompted for
y,n or !. Both y and n yeild the same results:
hack-local-variables-confirm: Wrong number of arguments: #[nil "À ?.Á .Âp!Ã " [menu-bar-menu-frame-live-and-visible-p menu-bar-non-minibuffer-window-p kill-buffer abort-recursive-edit] 2 2382972 nil], 1

When I set debug-on-error I get this stack trace:
Debugger entered--Lisp error: (wrong-number-of-arguments #[nil "\300 ?\206.\301 \203.\302p!\207\303 \207" [menu-bar-menu-frame-live-and-visible-p menu-bar-non-minibuffer-window-p kill-buffer abort-recursive-edit] 2 2382972 nil] 1)
  quit-window(t)
  hack-local-variables-confirm(((fill-column . 79) (indent-tabs-mode) (show-trailing-whitespace . t) (whitespace-style face trailing lines-tail space-before-tab indentation empty) (whitespace-newline . t)) ((whitespace-style face trailing lines-tail space-before-tab indentation empty) (whitespace-newline . t)) nil "/Users/jschewe/projects/people_tracker/working-dir/extlib/source/log4cplus-1.2.0/")
  hack-local-variables-filter(((whitespace-newline . t) (whitespace-style face trailing lines-tail space-before-tab indentation empty) (show-trailing-whitespace . t) (indent-tabs-mode) (fill-column . 79)) "/Users/jschewe/projects/people_tracker/working-dir/extlib/source/log4cplus-1.2.0/")
  hack-dir-local-variables()
  hack-local-variables()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer .dir-locals.el> "~/projects/people_tracker/working-dir/extlib/source/log4cplus-1.2.0/.dir-locals.el" nil nil "~/projects/people_tracker/working-dir/extlib/source/log4cplus-1.2.0/.dir-locals.el" (26456614 16777220))
  find-file-noselect("~/projects/people_tracker/working-dir/extlib/source/log4cplus-1.2.0/.dir-locals.el" nil nil t)
  find-file("~/projects/people_tracker/working-dir/extlib/source/log4cplus-1.2.0/.dir-locals.el" t)
  call-interactively(find-file nil nil)
  command-execute(find-file)

In GNU Emacs 24.5.1 (x86_64-apple-darwin15.3.0, NS apple-appkit-1404.34)
 of 2016-01-31 on teneleven-slave.macports.org
Windowing system distributor `Apple', version 10.3.1404
Configured using:
 `configure --prefix=/opt/local --with-ns --without-x --without-dbus
 CC=/usr/bin/clang 'CFLAGS=-pipe -Os -arch x86_64'
 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -arch
 x86_64' CPPFLAGS=-I/opt/local/include'

Important settings:
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  iswitchb-mode: t
  show-paren-mode: t
  display-time-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
done loading configuration
Loading /Users/jschewe/.xemacs/init.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Package iswitchb is obsolete!
ls does not support --dired; see `dired-use-ls-dired' for more details.
Please type y, n, or !: y
hack-local-variables-confirm: Wrong number of arguments: #[nil "À ?.Á .Âp!Ã " [menu-bar-menu-frame-live-and-visible-p menu-bar-non-minibuffer-window-p kill-buffer abort-recursive-edit] 2 2382972 nil], 1
Type C-x 1 to delete the help window.
Please type y, n, or !: n
Directory-local variables error: (wrong-number-of-arguments #[nil "\300 ?\206.\301 \203.\302p!\207\303 \207" [menu-bar-menu-frame-live-and-visible-p menu-bar-non-minibuffer-window-p kill-buffer abort-recursive-edit] 2 2382972 nil] 1)

Load-path shadows:
/Users/jschewe/.xemacs/xemacs-packages/lisp/cmake-mode hides /opt/local/share/emacs/site-lisp/cmake-mode
/Users/jschewe/.xemacs/xemacs-packages/lisp/bs hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/bs
/Users/jschewe/.xemacs/xemacs-packages/lisp/conf-mode hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/textmodes/conf-mode
/Users/jschewe/.xemacs/xemacs-packages/lisp/antlr-mode hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/progmodes/antlr-mode
/Users/jschewe/.xemacs/xemacs-packages/lisp/newsticker hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/net/newsticker
/Users/jschewe/.xemacs/xemacs-packages/lisp/mspools hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/mail/mspools
/Users/jschewe/.xemacs/xemacs-packages/lisp/re-builder hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/emacs-lisp/re-builder
/Users/jschewe/.xemacs/xemacs-packages/lisp/longlines hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/obsolete/longlines

Features:
(shadow sort gnus-util mail-extr emacsbug message idna format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils pp help-mode dired iswitchb bs advice
help-fns cperl-mode easymenu comint ansi-color ring paren time cus-start
cus-load time-date tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process cocoa ns
multi-tty emacs)

Memory information:
((conses 16 100342 5909)
 (symbols 48 20371 0)
 (miscs 40 61 223)
 (strings 32 16690 4793)
 (string-bytes 1 459948)
 (vectors 16 10830)
 (vector-slots 8 390618 3499)
 (floats 8 57 258)
 (intervals 56 309 19)
 (buffers 960 16))