[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help needed with defadvice
From: |
Perry Smith |
Subject: |
Re: Help needed with defadvice |
Date: |
Sat, 23 Nov 2013 09:22:35 -0600 |
On Nov 23, 2013, at 8:48 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> (,(or parent 'kill-all-local-variables)) <<<<<<<<<
> [...]
>> Does anyone know why this is there?
>
> Read the Elisp manual's description of what a major mode should do.
> Buffer-local variables are (in their majority) specific a particular
> major mode, hence they are reset when the major mode changes.
Ok. Alex suggested a bug report. I guess I will hold off on that. I have it
written up ready to send. Let me know if you would prefer it sent or not.
I got around the issue with:
(defadvice kill-all-local-variables (around inherit activate)
"We want inherited variables to survive a call to this function"
(let* ((set-list (mapcar (lambda ( v )
(cons v (symbol-value v)))
inherited-alist)))
ad-do-it
(mapcar (lambda ( c )
(set (car c) (cdr c)))
set-list)))
How about an extra blurb in the documentation for make-variable-buffer-local
(and / or) make-local-variable that notes that they are usually killed when
entering a new mode? It was clear that someone was killing the variables
but it was hard for me to track down who it was.
Thank you again to all who helped me out.
Perry
signature.asc
Description: Message signed with OpenPGP using GPGMail
- Help needed with defadvice, Perry Smith, 2013/11/21
- Re: Help needed with defadvice, Eric Abrahamsen, 2013/11/22
- Re: Help needed with defadvice, Alex Kost, 2013/11/22
- Re: Help needed with defadvice, Perry Smith, 2013/11/22
- Re: Help needed with defadvice, Alex Kost, 2013/11/22
- Re: Help needed with defadvice, Perry Smith, 2013/11/22
- Re: Help needed with defadvice, Alex Kost, 2013/11/23
- Re: Help needed with defadvice, Stefan Monnier, 2013/11/23
- Re: Help needed with defadvice,
Perry Smith <=
- Re: Help needed with defadvice, Stefan Monnier, 2013/11/23
- Re: Help needed with defadvice, Perry Smith, 2013/11/23
- Re: Help needed with defadvice, Stefan Monnier, 2013/11/24
- Re: Help needed with defadvice, Alex Kost, 2013/11/23
Message not available
Re: Help needed with defadvice, Stefan Monnier, 2013/11/22