From dec32be0d749098047e0fbaacbffeda0b15a8ee4 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 26 Aug 2020 11:47:23 +0100 Subject: fix(tazjin/emacs): Override vterm's internal title generator This used to be part of the public interface, but was removed and replaced with a (less useful) format string. Change-Id: I387557c20c2eddde16974c3fcad1712569db5325 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1841 Reviewed-by: tazjin Tested-by: BuildkiteCI --- users/tazjin/emacs/config/init.el | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'users') diff --git a/users/tazjin/emacs/config/init.el b/users/tazjin/emacs/config/init.el index 24719c8e450a..9f9573a3a8c7 100644 --- a/users/tazjin/emacs/config/init.el +++ b/users/tazjin/emacs/config/init.el @@ -165,14 +165,17 @@ :config (progn (setq vterm-shell "fish") (setq vterm-exit-functions - (lambda (&rest _) (kill-buffer (current-buffer)))) - (setq vterm-set-title-functions - (lambda (title) - (rename-buffer - (generate-new-buffer-name - (format "vterm<%s>" - (s-trim-left - (s-chop-prefix "fish" title))))))))) + (lambda (&rest _) (kill-buffer (current-buffer)))))) + +;; vterm removed the ability to set a custom title generator function +;; via the public API, so this overrides its private title generation +;; function instead +(defun vterm--set-title (title) + (rename-buffer + (generate-new-buffer-name + (format "vterm<%s>" + (s-trim-left + (s-chop-prefix "fish" title)))))) ;; ;; Packages providing language-specific functionality -- cgit 1.4.1