|
From: | Emanuel Berg |
Subject: | Re: How do I get the window height in lines, taking in account line-spacing? |
Date: | Tue, 05 Aug 2014 02:11:54 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Dmitry Gutov <dgutov@yandex.ru> writes: > So as long as I'm doing that, I might as well look > for a good solution. In my efforts to get civilized scrolling [1], I wrote something that might fit - should fit, if it doesn't, I want to now :) (defun get-window-lines () (let*((edges (window-inside-edges)) (top (nth 1 edges)) (bottom (nth 3 edges)) (lines (- bottom top)) ) (if (or (string= major-mode "w3m-mode") (string= major-mode "package-menu-mode")) (1- lines) lines) )) [1] http://user.it.uu.se/~embe8573/conf/emacs-init/scroll.el -- underground experts united
[Prev in Thread] | Current Thread | [Next in Thread] |