>>>> "robert" == robert delius royar
<xemacs(a)frinabulax.org> writes: 
    robert> ^L
    robert> local variables:
    robert> mode: text
    robert> eval: (hide-buffer-variables)
    robert> end:
    robert> Here is the defun:
(defun hide-buffer-variables ()
   "Narrow to first page and hide variables.  Assumes only two pages."
   (let ((pos (point)))
 	(end-of-buffer)
 	(narrow-to-page -1)
 	(goto-char pos)
 	)
   )
    robert> If I remove (goto-char pos), I do not get the error.  I
    robert> verified that pos is before the last page.
Well, what's happening is that XEmacs hasn't read the "end:"
directive, and tries to continue parsing.  Because you've disturbed
point, it finds a syntax error.  It would be possible to change the
local variables hack to read the sexps and save them until the "end:"
directive is read, then execute them, but eval expressions are
deprecated anyway.
I'm comfortable with saying "If it hurts, don't do it."  :-)
Alternative ways of achieving the same goal would be to write a mode
hook or similar to do the same thing, or even a whole mode.
-- 
Institute of Policy and Planning Sciences     
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.