diff --git a/core/core-dotspacemacs.el b/core/core-dotspacemacs.el index e556a2490..d09924bd1 100644 --- a/core/core-dotspacemacs.el +++ b/core/core-dotspacemacs.el @@ -681,14 +681,22 @@ If ARG is non nil then Ask questions to the user before installing the dotfile." %n -- prints Narrow if appropriate %z -- prints mnemonics of buffer, terminal, and keyboard coding systems %Z -- like %z, but including the end-of-line format" - (let* ((fs (format-spec-make - ?a (when (string-match-p "%a" title-format) - (abbreviate-file-name (or (buffer-file-name) - (buffer-name)))) - ?t (if (and (string-match-p "%t" title-format) - (fboundp 'projectile-project-name)) - (projectile-project-name) - "-") + (let* ((project-name (when (string-match-p "%t" title-format) + (if (boundp 'spacemacs--buffer-project-name) + spacemacs--buffer-project-name + (set (make-local-variable 'spacemacs--buffer-project-name) + (if (fboundp 'projectile-project-name) + (projectile-project-name) + "-"))))) + (abbreviated-file-name (when (string-match-p "%a" title-format) + (if (boundp 'spacemacs--buffer-abbreviated-filename) + spacemacs--buffer-abbreviated-filename + (set (make-local-variable 'spacemacs--buffer-abbreviated-filename) + (abbreviate-file-name (or (buffer-file-name) + (buffer-name))))))) + (fs (format-spec-make + ?a abbreviated-file-name + ?t project-name ?S system-name ?I invocation-name ?U (or (getenv "USER") "")