[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing side margins in specific mode changes side margins for all
From: |
Emanuel Berg |
Subject: |
Re: Changing side margins in specific mode changes side margins for all buffers |
Date: |
Wed, 17 Jun 2015 02:58:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> (add-hook 'window-configuration-change-hook
> (lambda ()
> (set-window-margins (car (get-buffer-window-list
> (current-buffer) nil t))
> 29 29))
> 'make-it-local)
>
> where you see that you pass `make-it-local' as third
> argument. And if you check `C-h f add-hook RET'
> you'll see that the third arg is called APPEND, and
> it's the *fourth* arg which is called LOCAL. So you
> just need to add a nil as third argument.
Aha, the HOOK is local, not the window-margins!
Then what I said is incorrect. It won't do what I said
(which is good).
>> Works like a charm. Thank you very much! I found
>> this code somewhere on stackoverflow.com.
>
> Could you try and find it again, so we can fix
> it there?
Wow, you are dedicated! Cred. Maybe we should all post
our Elisp on stackoverflow just to have you correct it
:)
--
underground experts united
http://user.it.uu.se/~embe8573