Skip to content

Instantly share code, notes, and snippets.

Created April 5, 2010 00:06
Show Gist options
  • Save anonymous/355833 to your computer and use it in GitHub Desktop.
Save anonymous/355833 to your computer and use it in GitHub Desktop.
;; 画面の行数を取得
(defun my-get-frame-rows()
"get frame rows"
(let (
(rows (round (/ (x-display-pixel-height) (frame-char-height))))
)
(- rows 3)
)
)
;; 画面半分になる幅を取得
(defun my-get-frame-cols()
"get frame cols"
(let (
(cols (round (/ (x-display-pixel-width) (frame-char-width))))
)
(- (round (/ cols 2)) 1)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment