Ilocker: Focus on Android Security (new entry, 0 Basics) qq:2597294287
在 emacs 启动时,会加载
~/.emacs
文件。在该文件中编辑一些 lisp 代码,是一种最为简单的定制 emacs 的方式。
下面的 lisp 代码主要实现几个按键绑定和窗口最大化等简单的配置:
1 ;; window maximization2(Defun my-maximized ()3 (Interactive)4(x-send-client-message5Nil 0 Nil "_net_wm_state" 326' (2 "_net_wm_state_maximized_horz" 0))7(x-send-client-message8Nil 0 Nil "_net_wm_state" 329' (2 "_net_wm_state_maximized_vert" 0))Ten ) One A ;; When you start Emacs, maximize the window -(my-maximized) - the ; automatically adds a new line at the end of the file -(Setq require-final-newline T) - - ;; Set tab to 4 spaces +(Setq tab-width 4 -indent-tabs-Mode T +C-basic-offset 4) A at ;; carriage return indent -(Global-set-key "\c-m" ' newline-and-indent) -(Global-set-key (kbd "c-<return>") ' newline) - - ;; F1: Open Help document -(Global-set-key [F1] ' info) in - ;; F2: Redo Last Action to(Global-set-key [F2] ' undo) + - ;; F3: Close Current buffer the(Global-set-key [F3] ' Kill-this-buffer)
Emacs Novice Note (iii)--a little simple customization for Emacs