;;; browse-console-fonts.el ;;; ;;; Copyright (C) 1997, 1998, 2000, 2004, 2007, 2008 Thien-Thi Nguyen ;;; ;;; This file is part of ttn's personal elisp library, released under ;;; the terms of the GNU General Public License as published by the ;;; Free Software Foundation; either version 3, or (at your option) any ;;; later version. There is NO WARRANTY. See file COPYING for details. ;;; Description: Browse console fonts. (require 'dired) ;;;autoload (defun browse-console-fonts (&optional arg) "Consider dired to be a font list and do setfont(1) on a file." (interactive "P") (if arg (let ((cmd (concat "setfont " (dired-get-filename)))) (shell-command cmd (concat "*shell* " cmd))) (dolist (dir '("/usr/share/consolefonts" "/usr/lib/kbd/consolefonts")) (when (file-exists-p dir) (dired dir) (use-local-map (copy-keymap (current-local-map))) (local-set-key "\C-m" (lambda () (interactive) (browse-console-fonts t))))))) (provide 'browse-console-fonts) ;;; browse-console-fonts.el ends here