* Why is make-variable-buffer-local interactive?
@ 2008-03-19 20:16 Lennart Borgman (gmail)
2008-03-20 14:14 ` Stefan Monnier
2008-03-21 6:58 ` Toby Allsopp
0 siblings, 2 replies; 9+ messages in thread
From: Lennart Borgman (gmail) @ 2008-03-19 20:16 UTC (permalink / raw)
To: Emacs Devel
Does it really make sense to do such changes interactively? If you know
what you are doing when you call this function then surely you know how
to do it in elisp, or?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why is make-variable-buffer-local interactive?
2008-03-19 20:16 Why is make-variable-buffer-local interactive? Lennart Borgman (gmail)
@ 2008-03-20 14:14 ` Stefan Monnier
2008-03-21 6:58 ` Toby Allsopp
1 sibling, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2008-03-20 14:14 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: Emacs Devel
> Does it really make sense to do such changes interactively? If you know what
> you are doing when you call this function then surely you know how to do it
> in elisp, or?
Indeed. Please make it non-interactive.
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why is make-variable-buffer-local interactive?
2008-03-19 20:16 Why is make-variable-buffer-local interactive? Lennart Borgman (gmail)
2008-03-20 14:14 ` Stefan Monnier
@ 2008-03-21 6:58 ` Toby Allsopp
2008-03-21 10:57 ` Lennart Borgman (gmail)
2008-03-21 17:59 ` Stefan Monnier
1 sibling, 2 replies; 9+ messages in thread
From: Toby Allsopp @ 2008-03-21 6:58 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: Emacs Devel
On Thu, Mar 20 2008, Lennart Borgman (gmail) wrote:
> Does it really make sense to do such changes interactively? If you
> know what you are doing when you call this function then surely you
> know how to do it in elisp, or?
FWIW, I use M-x make-variable-buffer-local quite often while editing
Perl code using cperl-mode. I find that I quite often want different
values of `cperl-indent-level' in different buffers. Perhaps this means
I should just put (make-variable-buffer-local 'cperl-indent-level) in my
.emacs.
Toby.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why is make-variable-buffer-local interactive?
2008-03-21 6:58 ` Toby Allsopp
@ 2008-03-21 10:57 ` Lennart Borgman (gmail)
2008-03-21 18:39 ` Toby Allsopp
2008-03-21 17:59 ` Stefan Monnier
1 sibling, 1 reply; 9+ messages in thread
From: Lennart Borgman (gmail) @ 2008-03-21 10:57 UTC (permalink / raw)
To: Toby Allsopp; +Cc: Emacs Devel
Toby Allsopp wrote:
> On Thu, Mar 20 2008, Lennart Borgman (gmail) wrote:
>
>> Does it really make sense to do such changes interactively? If you
>> know what you are doing when you call this function then surely you
>> know how to do it in elisp, or?
>
> FWIW, I use M-x make-variable-buffer-local quite often while editing
> Perl code using cperl-mode. I find that I quite often want different
> values of `cperl-indent-level' in different buffers. Perhaps this means
> I should just put (make-variable-buffer-local 'cperl-indent-level) in my
> .emacs.
Yes, probably. There is of course also make-local-variable which is less
drastic (but does not help very much in .emacs ... ;-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why is make-variable-buffer-local interactive?
2008-03-21 10:57 ` Lennart Borgman (gmail)
@ 2008-03-21 18:39 ` Toby Allsopp
0 siblings, 0 replies; 9+ messages in thread
From: Toby Allsopp @ 2008-03-21 18:39 UTC (permalink / raw)
To: Emacs Devel; +Cc: Lennart Borgman (gmail), Stefan Monnier
Toby Allsopp wrote:
>> FWIW, I use M-x make-variable-buffer-local quite often while editing
>> Perl code using cperl-mode. I find that I quite often want different
>> values of `cperl-indent-level' in different buffers. Perhaps this means
>> I should just put (make-variable-buffer-local 'cperl-indent-level) in my
>> .emacs.
On Fri, Mar 21 2008, Lennart Borgman (gmail) wrote:
> Yes, probably. There is of course also make-local-variable which is
> less drastic (but does not help very much in .emacs ... ;-)
On Sat, Mar 22 2008, Stefan Monnier wrote:
> This is not a good use case for make-variable-buffer-local. It's a use
> case for make-local-variable (or something along these lines: maybe
> there should be a M-x set-var-locally).
Ah, thanks, make-local-variable sounds like exactly what I actually
want. Something like set-var-locally would be pretty handy, but I can
easily define one in my .emacs.
Regards,
Toby.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why is make-variable-buffer-local interactive?
2008-03-21 6:58 ` Toby Allsopp
2008-03-21 10:57 ` Lennart Borgman (gmail)
@ 2008-03-21 17:59 ` Stefan Monnier
2008-03-21 18:36 ` Juanma Barranquero
1 sibling, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2008-03-21 17:59 UTC (permalink / raw)
To: Toby Allsopp; +Cc: Lennart Borgman (gmail), Emacs Devel
>> Does it really make sense to do such changes interactively? If you
>> know what you are doing when you call this function then surely you
>> know how to do it in elisp, or?
> FWIW, I use M-x make-variable-buffer-local quite often while editing
> Perl code using cperl-mode. I find that I quite often want different
> values of `cperl-indent-level' in different buffers. Perhaps this means
> I should just put (make-variable-buffer-local 'cperl-indent-level) in my
> .emacs.
This is not a good use case for make-variable-buffer-local. It's a use
case for make-local-variable (or something along these lines: maybe
there should be a M-x set-var-locally).
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why is make-variable-buffer-local interactive?
2008-03-21 17:59 ` Stefan Monnier
@ 2008-03-21 18:36 ` Juanma Barranquero
2008-03-21 18:45 ` Stefan Monnier
2008-03-21 18:57 ` Toby Allsopp
0 siblings, 2 replies; 9+ messages in thread
From: Juanma Barranquero @ 2008-03-21 18:36 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Lennart Borgman (gmail), Toby Allsopp, Emacs Devel
On Fri, Mar 21, 2008 at 6:59 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
> (or something along these lines: maybe
> there should be a M-x set-var-locally).
C-u M-x set-variable <RET>
Juanma
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why is make-variable-buffer-local interactive?
2008-03-21 18:36 ` Juanma Barranquero
@ 2008-03-21 18:45 ` Stefan Monnier
2008-03-21 18:57 ` Toby Allsopp
1 sibling, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2008-03-21 18:45 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: Lennart Borgman (gmail), Toby Allsopp, Emacs Devel
>> (or something along these lines: maybe
>> there should be a M-x set-var-locally).
> C-u M-x set-variable <RET>
Thanks,
Stefan "who uses M-: (set (make-local-variable ...) ...) instead"
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Why is make-variable-buffer-local interactive?
2008-03-21 18:36 ` Juanma Barranquero
2008-03-21 18:45 ` Stefan Monnier
@ 2008-03-21 18:57 ` Toby Allsopp
1 sibling, 0 replies; 9+ messages in thread
From: Toby Allsopp @ 2008-03-21 18:57 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: Lennart Borgman (gmail), Stefan Monnier, Emacs Devel
On Sat, Mar 22 2008, Juanma Barranquero wrote:
> On Fri, Mar 21, 2008 at 6:59 PM, Stefan Monnier
> <monnier@iro.umontreal.ca> wrote:
>
>> (or something along these lines: maybe
>> there should be a M-x set-var-locally).
>
> C-u M-x set-variable <RET>
Well there you go! It was right under my nose all along.
Thanks,
Toby.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-03-21 18:57 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-19 20:16 Why is make-variable-buffer-local interactive? Lennart Borgman (gmail)
2008-03-20 14:14 ` Stefan Monnier
2008-03-21 6:58 ` Toby Allsopp
2008-03-21 10:57 ` Lennart Borgman (gmail)
2008-03-21 18:39 ` Toby Allsopp
2008-03-21 17:59 ` Stefan Monnier
2008-03-21 18:36 ` Juanma Barranquero
2008-03-21 18:45 ` Stefan Monnier
2008-03-21 18:57 ` Toby Allsopp
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).