From: nixie <onixie@gmail.com>
To: 8379@debbugs.gnu.org
Subject: bug#8379: The width of linum window is not adjusted after face-remapping
Date: Wed, 30 Mar 2011 10:43:49 +0900 [thread overview]
Message-ID: <1301449429.2448.36.camel@nixie-desktop> (raw)
Hi,
I am green hand in emacs, and starting using GNU Emacs since 23.1.
I found that the width of linum window is not changed with
(text-scale-increase) or (text-scale-decrease) function.
This is annoying especially when I increase the text size, because the
line number can not be fully viewed.
currently, I use some alleviating code like below to solve this problem.
But I think it does not have generality.
Does someone have any good suggestion on it? Or it can be solved in a
more elegant and general way. I wish that it would be solved in future
version of GNU Emacs.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun rescale-window-margin-by-faceremapping (win)
(let ((width (car (window-margins)))
(scale (cadr (assoc ':height
(assoc 'default
face-remapping-alist)))))
(if (numberp scale)
(progn
(set-window-margins win (ceiling (* width scale)) (cdr
(window-margins win)))
(force-window-update))
nil)))
(defadvice linum-update-window (after scaling-margin-width last (win)
activate)
(rescale-window-margin-by-faceremapping win)
ad-return-value)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Thanks for any help.
--
nixie <onixie@gmail.com>
next reply other threads:[~2011-03-30 1:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-30 1:43 nixie [this message]
2011-03-30 2:18 ` bug#8379: The width of linum window is not adjusted afterface-remapping Drew Adams
2011-03-30 10:39 ` bug#8379: The width of linum window is not adjusted after face-remapping Juanma Barranquero
2011-03-30 13:19 ` bug#8379: The width of linum window is not adjusted afterface-remapping Drew Adams
2011-03-30 13:53 ` Juanma Barranquero
2011-03-31 9:31 ` nixie
2011-03-31 13:22 ` Drew Adams
2011-03-31 14:40 ` Juanma Barranquero
2011-03-31 14:48 ` Drew Adams
2011-03-31 14:54 ` Juanma Barranquero
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=1301449429.2448.36.camel@nixie-desktop \
--to=onixie@gmail.com \
--cc=8379@debbugs.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.