From: martin rudalics <address@hidden>
To: Herbert Euler <address@hidden>
CC: address@hidden, address@hidden, address@hidden
Subject: Re: Patch: Syntax and Hard Newlines
Date: Thu, 16 Nov 2006 17:03:33 +0100
> What about this?
> + (if (local-variable-p 'parse-sexp-lookup-properties)
> + (setq longlines-parse-sexp-lookup-properties
> + parse-sexp-lookup-properties
> + longlines-pslp-was-local
> + t
> + parse-sexp-lookup-properties
> + t)
> + (setq longlines-pslp-was-local nil)
> + (set (make-local-variable 'parse-sexp-lookup-properties) t))
[...]
> + (if longlines-pslp-was-local
> + (setq parse-sexp-lookup-properties
> + longlines-parse-sexp-lookup-properties)
> + (kill-local-variable 'parse-sexp-lookup-properties))
It should work with major modes since their activation usually kills all
local variables. It won't work if another minor mode eventually needs
this too. Suppose you
(1) turn on longlines mode with `parse-sexp-lookup-properties' locally nil,
(2) turn on a minor mode that sets `parse-sexp-lookup-properties' to t,
(3) turn off longlines mode.
Hence I'd rather leave this alone when turning off longlines mode.