emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch: Syntax and Hard Newlines


From: martin rudalics
Subject: Re: Patch: Syntax and Hard Newlines
Date: Thu, 16 Nov 2006 17:03:33 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]