From xemacs-m  Thu Jan 23 02:16:18 1997
Received: from mail.telstra.com.au (mail.telstra.com.au [192.148.160.10])
          by xemacs.org (8.8.4/8.8.4) with ESMTP
	  id CAA13456 for <xemacs-beta@xemacs.org>; Thu, 23 Jan 1997 02:16:16 -0600 (CST)
Received: (from uucp@localhost) by mail.telstra.com.au (8.8.2/8.6.9) id TAA01313 for <xemacs-beta@xemacs.org>; Thu, 23 Jan 1997 19:15:45 +1100 (EST)
Received: from mail_gw.fwall.telecom.com.au(192.148.147.10) by mail via smap (V1.3)
	id sma019773; Thu Jan 23 17:47:24 1997
Received: (from uucp@localhost) by mail_gw.fwall.telecom.com.au (8.8.2/8.6.9) id RAA05535 for <xemacs-beta@xemacs.org>; Thu, 23 Jan 1997 17:47:24 +1100 (EST)
Received: from cdn_mail.dn.itg.telecom.com.au(144.135.109.134) by mail-gw.fwall.telstra.com.au via smap (V1.3)
	id sma004916; Thu Jan 23 17:42:50 1997
Received: from bunyip.tansu.com.au ([149.135.253.10]) by cdn-mail.telecom.com.au (8.8.2/8.6.9) with ESMTP id RAA24813 for <xemacs-beta@xemacs.org>; Thu, 23 Jan 1997 17:42:49 +1100 (EST)
Received: from humpback.ind.tansu.com.au (humpback.ind.tansu.com.au [149.135.128.11]) by bunyip.tansu.com.au (8.6.11/8.6.9) with ESMTP id RAA02080 for <xemacs-beta@xemacs.org>; Thu, 23 Jan 1997 17:42:48 +1100
Received: (from mbrader@localhost) by humpback.ind.tansu.com.au (8.6.12/8.6.9) id RAA24295; Thu, 23 Jan 1997 17:42:48 +1100
To: xemacs-beta@xemacs.org
Subject: xemacs-19.15-b90 files.el: hack-local-variables-prop-line too eager
From: Michael Brader <mbrader@ind.tansu.com.au>
Date: 23 Jan 1997 17:42:48 +1100
Message-ID: <ywlhgk8evtj.fsf@humpback.ind.tansu.com.au>
Lines: 71
X-Mailer: Red Gnus v0.81/XEmacs 19.15

In lisp/prim/files.el, this function (unlike the versions in 19.14 and
20.0b90) is not checking whether a -*- line has been found before
calling hack-local-variables-p.

If enable-local-variables is set to neither t nor nil, this causes the
user to be queried for almost every file they open. Wrapping the last
part of hack-local-variables-prop-line with (if result (...)) as in
20.0 solves the problem.

Apologies if this has already been spotted. I have only been lurking
here for a week. If you apply the patch in this post, byte-compile
files.el and remake, normal behaviour ensues.

*** lisp/prim/files.el	Sun Dec 22 11:29:26 1996
--- lisp/prim/files.el.new	Thu Jan 23 16:33:39 1997
***************
*** 1285,1307 ****
  		   (setq result (cons (cons key val) result))
  		   (skip-chars-forward " \t;")))
  	       (setq result (nreverse result))))))
- 	
-     (let ((set-any-p (or force (hack-local-variables-p t)))
- 	  (mode-p nil))
-       (while result
- 	(let ((key (car (car result)))
- 	      (val (cdr (car result))))
- 	  (cond ((eq key 'mode)
- 		 (setq mode-p t)
- 		 (funcall (intern (concat (downcase (symbol-name val))
- 					  "-mode"))))
- 		(set-any-p
- 		 (hack-one-local-variable key val))
- 		(t
- 		 nil)))
- 	(setq result (cdr result)))
-       mode-p)))
  
  (defvar hack-local-variables-hook nil
    "Normal hook run after processing a file's local variables specs.
  Major modes can use this to examine user-specified local variables
--- 1285,1308 ----
  		   (setq result (cons (cons key val) result))
  		   (skip-chars-forward " \t;")))
  	       (setq result (nreverse result))))))
  
+     (if result
+ 	(let ((set-any-p (or force (hack-local-variables-p t)))
+ 	      (mode-p nil))
+ 	  (while result
+ 	    (let ((key (car (car result)))
+ 		  (val (cdr (car result))))
+ 	      (cond ((eq key 'mode)
+ 		     (setq mode-p t)
+ 		     (funcall (intern (concat (downcase (symbol-name val))
+ 					      "-mode"))))
+ 		    (set-any-p
+ 		     (hack-one-local-variable key val))
+ 		    (t
+ 		     nil)))
+ 	    (setq result (cdr result)))
+ 	  mode-p))))
+ 
  (defvar hack-local-variables-hook nil
    "Normal hook run after processing a file's local variables specs.
  Major modes can use this to examine user-specified local variables


-- 
Michael Brader                             mbrader@ind.tansu.com.au
Branch Infrastructure Support Group
Telstra IN Platforms

