[elpa] 01/01: * packages/nlinum/nlinum.el (nlinum--face-height): New function. (nlinum--setup-window): Use it.

2014-06-20 Thread Stefan Monnier
monnier pushed a commit to branch master
in repository elpa.

commit 76cd6eb99731c40612cc8531448d76175bebd123
Author: Stefan Monnier 
Date:   Fri Jun 20 11:23:33 2014 -0400

* packages/nlinum/nlinum.el (nlinum--face-height): New function.
(nlinum--setup-window): Use it.
---
 packages/nlinum/nlinum.el |   15 ---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/packages/nlinum/nlinum.el b/packages/nlinum/nlinum.el
index 41b79b6..8719e92 100644
--- a/packages/nlinum/nlinum.el
+++ b/packages/nlinum/nlinum.el
@@ -4,7 +4,7 @@
 
 ;; Author: Stefan Monnier 
 ;; Keywords: convenience
-;; Version: 1.3
+;; Version: 1.4
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -68,9 +68,18 @@ Linum mode is a buffer-local minor mode."
 (jit-lock-register #'nlinum--region t))
   (nlinum--setup-windows))
 
+(defun nlinum--face-height (face)
+  (aref (font-info (face-font face)) 2))
+
 (defun nlinum--setup-window ()
-  (set-window-margins nil (if nlinum-mode nlinum--width)
-  (cdr (window-margins
+  (let ((width (ceiling
+;; We'd really want to check the widths rather than the
+;; heights, but it's a start.
+(/ (* nlinum--width 1.0
+  (nlinum--face-height 'linum))
+   (frame-char-height)
+(set-window-margins nil (if nlinum-mode width)
+(cdr (window-margins)
 
 (defun nlinum--setup-windows ()
   (dolist (win (get-buffer-window-list nil nil t))



[elpa] branch master updated (40266fb -> 76cd6eb)

2014-06-20 Thread Stefan Monnier
monnier pushed a change to branch master
in repository elpa.

  from  40266fb   * aumix-mode: New package.
   new  76cd6eb   * packages/nlinum/nlinum.el (nlinum--face-height): New 
function. (nlinum--setup-window): Use it.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 packages/nlinum/nlinum.el |   15 ---
 1 files changed, 12 insertions(+), 3 deletions(-)