blob: f00cb2bc663e4b6d1cbeae99634acec51277ceb7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
;;; wasp-mandarin --- description -*- lexical-binding: t; -*-
;;; Commentary:
;;; Code:
(defun w/mandarin ()
"Modify the interface to support language learning."
(interactive)
(defun mode-line-render (left right)
"Return a string of `window-width' length containing LEFT and RIGHT."
(let* ((available-width (- (window-width) (length left) 10)))
(format (format " %%s %%%ds " available-width) left right)))
(setq mode-line-format
(setq-default mode-line-format
`((:eval
(mode-line-render
(concat
(propertize (format-mode-line (buffer-name)) 'face 'bold)
" —— "
(format-mode-line mode-name)
"模式 —— "
(s-replace "~" "家园" (c/replace-home default-directory)))
(format-mode-line
'(line-number-mode
(" 排%l" (column-number-mode " 柱%c")))))))))
)
(provide 'wasp-mandarin)
;;; wasp-mandarin.el ends here
|