From 7ef1082d6e5fa655624cf7b9d8e87e2bf1fd5c76 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 26 Dec 2014 02:13:36 +0900 Subject: [PATCH] emacs.el: Do not emit error when tty-type is not available --- emacs.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/emacs.el b/emacs.el index c4434d0..7a96669 100644 --- a/emacs.el +++ b/emacs.el @@ -383,10 +383,12 @@ found, otherwise returns nil." (setq terminal-title-format '((file-name-nondirectory (directory-file-name default-directory)))) - (if (and (equal (car (split-string (frame-parameter nil - 'tty-type) - "-")) - "screen") + (if (and (let ((tty-type (frame-parameter nil + 'tty-type))) + (and tty-type + (equal (car (split-string tty-type + "-")) + "screen"))) (not (getenv "SSH_CONNECTION"))) (setq terminal-title-format '((file-name-nondirectory (directory-file-name