unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Albert Reiner <areiner@tph.tuwien.ac.at>
Subject: Re: eval: (search-forward) (Solved)
Date: 24 Oct 2004 18:11:39 +0200	[thread overview]
Message-ID: <vw8acucdrk4.fsf_-_@berry.phys.ntnu.no> (raw)
In-Reply-To: bjjbrf0wlu3.fsf@termo1.fi.uib.no

Joakim,

thanks a lot for your reply:

[Joakim Hove <hove@ift.uib.no>, Mon, 18 Oct 2004 09:02:12 +0200]:
> Albert Reiner <areiner@tph.tuwien.ac.at> writes:
> 
> > But surprisingly, after the hook is run the boundp test always
> > fails, as if the buffer-local value went away after initialization.
> > Any simple fix?
> 
> Maybe; I think local variables defined on the top of the file are
> meant only for the initialization, maybe the go out of scope when the
> initialization is complete. Try putting the relevant string *at the
> bottom* of the file instead:elisp
> 
> ;;; Local Variables: ***
> ;;; work-string: ";;; Start here" ***
> ;;; End: ***
> 
> Read more about File Variables in (info "(emacs) File Variables").

(The variable settings were already at the end, and the info manual
does not seem to indicate a distinction between those on the top and
those at the bottom of the file.)

All of this turned out to be the result of testing this exclusively
with files in noweb major mode.  That mode does some mode changing
depending on where in the file point is, and apparently only those
variables where the permanent-local property is t are visible once
noweb-code-mode or noweb-doc-mode are in effect.

The simple solution is to add (put 'work-string 'permanent-local t) to
the defun; the correct thing would probably be to change noweb-mode.el
so that noweb-make-variable-permanent-local is mapped over all
file-local variables, i.e., to add something like (mapcar
'noweb-make-variable-permanent-local (mapcar 'car
(buffer-local-variables))) to the defun noweb-mode, but I do not
understand noweb-mode.el enough to know whether this is safe.

Thanks again for taking the time to answer,

Albert.

  reply	other threads:[~2004-10-24 16:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-09 12:48 eval: (search-forward) Albert Reiner
2004-10-10 12:33 ` Oliver Scholz
2004-10-10 14:48   ` Albert Reiner
2004-10-11  7:59     ` Joakim Hove
2004-10-11 10:16       ` Albert Reiner
2004-10-12 13:57       ` Albert Reiner
2004-10-18  7:02         ` Joakim Hove
2004-10-24 16:11           ` Albert Reiner [this message]
2004-10-11  9:40     ` Oliver Scholz
2004-10-11 10:09       ` Albert Reiner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vw8acucdrk4.fsf_-_@berry.phys.ntnu.no \
    --to=areiner@tph.tuwien.ac.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).