[gnu.emacs.bug] Proposed enhancement to hack-local-variables

cks@white.toronto.edu (Chris Siebenmann) (06/27/89)

 If you have inhibit-local-variables set, hack-local-variables will
ask you if you want to set the local variables in a file being loaded
in. Unfortunately, it won't show you what they are, making the
question something less useful than it could be. The following diff to
the 18.53 files.el will fix this; you can either apply this to your
files.el, or make a copy, apply it to the copy, and extract the
hack-local-variables function & load it in your .emacs (which is what
I do).

*** /src/src2/emacs-18.53/lisp/files.el	Wed Dec 21 00:52:58 1988
--- /tmp/files.el	Mon Jun 26 17:13:15 1989
***************
*** 382,389
  	  (and (search-forward "Local Variables:" nil t)
  	       (or (not inhibit-local-variables)
  		   force
! 		   (y-or-n-p (format"Set local variables as specified at end of %s? "
! 				    (file-name-nondirectory buffer-file-name))))))
  	(let ((continue t)
  	      prefix prefixlen suffix beg)
  	  ;; The prefix is what comes before "local variables:" in its line.

--- 382,392 -----
  	  (and (search-forward "Local Variables:" nil t)
  	       (or (not inhibit-local-variables)
  		   force
! 		   (save-window-excursion
! 		     (switch-to-buffer (current-buffer) t)
! 		     (y-or-n-p (format
! 				"Set local variables as specified at end of %s? "
! 				(file-name-nondirectory buffer-file-name)))))))
  	(let ((continue t)
  	      prefix prefixlen suffix beg)
  	  ;; The prefix is what comes before "local variables:" in its line.

-- 
	"I shall clasp my hands together and bow to the corners of the world."
			Number Ten Ox, "Bridge of Birds"
Chris Siebenmann		...!utgpu!{ncrcan,ontmoh!moore}!ziebmef!cks
cks@white.toronto.edu	     or ...!utgpu!{,csri!}cks