[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] allow function values for `enable-local-eval'
From: |
Karl Fogel |
Subject: |
Re: [PATCH] allow function values for `enable-local-eval' |
Date: |
26 Jun 2002 19:00:47 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 |
Excuse me, there's a braino in the patch to forms.el I just sent.
Here's a better patch for just that file. Since the code is asking
whether or not to evaluate the entire buffer, I wasn't sure what to
pass as the expr argument to the enable-local-eval function value; so
below it just passes the string "(entire buffer)". Better solutions
are solicited...
-Karl
> --- forms.el.~2.43.~ Thu Jun 6 19:24:24 2002
> +++ forms.el Wed Jun 26 17:06:23 2002
> @@ -519,11 +519,12 @@
>
> ;; eval the buffer, should set variables
> ;;(message "forms: processing control file...")
> - ;; If enable-local-eval is not set to t the user is asked first.
> (if (or (eq enable-local-eval t)
> - (yes-or-no-p
> - (concat "Evaluate lisp code in buffer "
> - (buffer-name) " to display forms ")))
> + (if (functionp enable-local-eval)
> + (funcall enable-local-eval "(entire buffer)")
> + (yes-or-no-p
> + (concat "Evaluate lisp code in buffer "
> + (buffer-name) " to display forms "))))
> (eval-current-buffer)
> (error "`enable-local-eval' inhibits buffer evaluation"))