Guest User

Untitled

a guest
Jun 22nd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. ;; Set the modeline to tell me the filename, hostname, etc..
  2. (setq-default mode-line-format
  3. (list " "
  4. ; */% indicators if the file has been modified
  5. 'mode-line-modified
  6. "--"
  7. ; the name of the buffer (i.e. filename)
  8. ; note this gets automatically highlighted
  9. 'mode-line-buffer-identification
  10. "--"
  11. ; major and minor modes in effect
  12. 'mode-line-modes
  13. ; if which-func-mode is in effect, display which
  14. ; function we are currently in.
  15. '(which-func-mode ("" which-func-format "--"))
  16. ; line, column, file %
  17. 'mode-line-position
  18. "--"
  19. ; if vc-mode is in effect, display version control
  20. ; info here
  21. `(vc-mode vc-mode)
  22. "--"
  23. ; hostname
  24. 'system-name
  25. ; dashes sufficient to fill rest of modeline.
  26. "-%-"
  27. )
  28. )
  29.  
  30. (let ((pos (memq 'mode-line-modes mode-line-format)))
  31. (setcdr pos (cons (getenv "HOSTNAME") (cdr pos))))
  32.  
  33. (setq-default mode-line-format (build-list-that-contains-(getenv "HOSTNAME")))
Add Comment
Please, Sign In to add comment