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: Herbert Euler
Subject: Re: Patch: Syntax and Hard Newlines
Date: Fri, 17 Nov 2006 09:36:08 +0800

I'm sorry I misunderstood you again.  Let me try another fix....

Regards,
Guanpeng Xu

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.


_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/





reply via email to

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