emacs-framebuffer

Emacs library to show images and documents in console using Linux framebuffer
Log | Files | Refs

commit ffe92aa42ff719dfe61cf237e8b6283ebd60aa1f
parent 23ab19d4139228c45268aee9fe2dad6a1b24a96b
Author: Tomas Hlavaty <tom@logand.com>
Date:   Sun, 11 Sep 2022 20:04:46 +0200

factor out framebuffer-terminal

Diffstat:
Memacs-framebuffer.el | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/emacs-framebuffer.el b/emacs-framebuffer.el @@ -194,12 +194,13 @@ (when (string-match "^/dev/tty[0-9]+$" filename) filename)) +(defun framebuffer-terminal () + (file-chase-links (format "/proc/%d/fd/0" (emacs-pid)))) + (defvar framebuffer-tty nil) (defun framebuffer-tty () (or framebuffer-tty - (setq framebuffer-tty - (framebuffer-tty-p - (file-chase-links (format "/proc/%d/fd/0" (emacs-pid))))))) + (setq framebuffer-tty (framebuffer-tty-p (framebuffer-terminal))))) ;; TODO file-exists-p should return filename, not t (defun framebuffer-file-exists-p (filename)