On Tue, 28 Jan 2003, stephen(a)xemacs.org wrote:
>>>>> "Jeff" == Jeff Mincy
<jeff(a)delphioutpost.com> writes:
Jeff> Changing the default value of nt-fake-unix-uid sounds
Jeff> reasonable to me... Windows 95/98/ME doesn't have much of a
Jeff> concept of user or root, so uid/user doesn't mean anything,
Jeff> right?
Which means they're effectively root. I think we should wear white
hats, here. Document it, make it a defcustom, give it a top level
menu item. But make people think about it for five seconds.
Yes, I am both root and the administrator on the windows98 machine,
but most of the time, I'm just a user, but I wish the user would stop
getting bread crumbs on the keyboard.
Right now, the implementation of the uid=root check, effectively means
that enable-local-eval can only be nil when logged in as root. How
about changing the implementation here so that uid=root ignores
enable-local-eval only when set to t, and still allows 'maybe' to ask?
Change this:
(if (and (not (zerop (user-uid)))
(or (eq enable-local-eval t)
(and enable-local-eval
(save-window-excursion
(switch-to-buffer (current-buffer)) ...
to:
(if (or (and (eq enable-local-eval t) (not (zerop (user-uid))))
(and enable-local-eval
(save-window-excursion
(switch-to-buffer (current-buffer)) ...
And make the
(y-or-n-p (format "Process `eval' or hook local variables in file %s? "
(file-name-nondirectory buffer-file-name)))
more forceful for uid=root by using yes-or-no-p.
Jeff> But in order to get the local-eval to stop asking or to
Jeff> happen at all on windows, I had to advise
Jeff> hack-one-local-variable:
What do you mean by "stop asking"?
Sorry, imprecise, I can't get it to stop asking for a particular :eval
expression, without enabling :eval for all expressions. Basically,
setting enable-local-eval to t is not really an option - it is asking
for trouble.
Jeff> Maybe we could have a local-eval-expressions
customization
Jeff> (say an alist of expressions with nil/:ask/t values) that
Jeff> allows the user to explicitly say that certain eval
Jeff> expressions that are ok. This check could be done before
Jeff> checking for (zerop (user-uid)). Basically, any minor-mode
Jeff> function is, or should be, ok in a :eval.
I can see this might be useful. How close does the match have to be?
#'equal?
Yes, I was thinking equal.
(Of course, enabling minor modes is in general deprecated in local
variables sections. You're supposed to do that in mode hooks.)
-jeff