From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: Changing side margins in specific mode changes side margins for all buffers
Date: Wed, 17 Jun 2015 02:58:44 +0200 [thread overview]
Message-ID: <87pp4vdubf.fsf@debian.uxu> (raw)
In-Reply-To: jwvfv5sihqh.fsf-monnier+gnu.emacs.help@gnu.org
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
next prev parent reply other threads:[~2015-06-17 0:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.5065.1434407365.904.help-gnu-emacs@gnu.org>
2015-06-15 23:04 ` Changing side margins in specific mode changes side margins for all buffers Emanuel Berg
2015-06-16 1:13 ` Stefan Monnier
2015-06-17 0:58 ` Emanuel Berg [this message]
2015-06-15 22:29 hack writer
2015-06-16 21:47 ` hack writer
[not found] ` <mailman.5129.1434491234.904.help-gnu-emacs@gnu.org>
2015-06-16 22:35 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pp4vdubf.fsf@debian.uxu \
--to=embe8573@student.uu.se \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.