Change the title of a frame to the current file name

This commit is contained in:
Gergely Polonkai 2016-11-10 11:36:48 +01:00
parent fa68c7ce00
commit d76643ae93

17
init.el
View File

@ -928,11 +928,11 @@
'(("lambda" . 955) ; λ
("->" . 8594) ; →
("=>" . 8658) ; ⇒
("map" . 8614))) ; ↦
("map" . 8614)) ; ↦
;; …and some pairs to complete
;; TODO: maybe add-to-list is a better way to do it
(setq insert-pair-alist
'(
insert-pair-alist '(
(40 41) ; ()
(91 93) ; []
(123 125) ; {}
@ -946,5 +946,12 @@
(8249 8250) ;
(8250 8249) ;
(171 187) ; «»
(187 171) ; »«
))
(187 171)) ; »«
;; Set the frame title to the current file name
frame-title-format '((:eval (concat system-name
": "
(if (buffer-file-name)
(abbreviate-file-name
(buffer-file-name))
"%b")))))