[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8379: The width of linum window is not adjusted after face-remapping
From: |
nixie |
Subject: |
bug#8379: The width of linum window is not adjusted after face-remapping |
Date: |
Wed, 30 Mar 2011 10:43:49 +0900 |
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>
- bug#8379: The width of linum window is not adjusted after face-remapping,
nixie <=
- bug#8379: The width of linum window is not adjusted afterface-remapping, Drew Adams, 2011/03/29
- bug#8379: The width of linum window is not adjusted after face-remapping, Juanma Barranquero, 2011/03/30
- bug#8379: The width of linum window is not adjusted afterface-remapping, Drew Adams, 2011/03/30
- bug#8379: The width of linum window is not adjusted afterface-remapping, Juanma Barranquero, 2011/03/30
- bug#8379: The width of linum window is not adjusted afterface-remapping, nixie, 2011/03/31
- bug#8379: The width of linum window is not adjusted afterface-remapping, Drew Adams, 2011/03/31
- bug#8379: The width of linum window is not adjusted afterface-remapping, Juanma Barranquero, 2011/03/31
- bug#8379: The width of linum window is not adjusted afterface-remapping, Drew Adams, 2011/03/31
- bug#8379: The width of linum window is not adjusted afterface-remapping, Juanma Barranquero, 2011/03/31