From 15e95c366fef562b71b43c1e6ab909ecf16845bc Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sat, 16 Feb 2019 11:45:45 -0800 Subject: [emacs] Add a function to select and copy buffer. --- emacs.d/init.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/emacs.d/init.el b/emacs.d/init.el index 3ae3ea7..c0c2d60 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -57,6 +57,13 @@ (replace-regexp "\s?|\s?" "" nil (region-beginning) (region-end)) (replace-regexp "\s?|\s?" ""))) +(defun fcuny/copy-whole-buffer () + "Selects the buffer and copy it." + (interactive) + (save-excursion + (mark-whole-buffer) + (copy-region-as-kill 1 (buffer-size)))) + ;; set utf-8 as the default encoding (prefer-coding-system 'utf-8-unix) (set-terminal-coding-system 'utf-8) @@ -102,7 +109,7 @@ (defun fcuny/setup-frame(&optional frame) (fringe-mode '(10 . 10)) (setq-default frame-title-format "%b") - (set-face-attribute 'default nil :height 140 :weight 'normal :width 'normal :font "Source Code Pro") + (set-face-attribute 'default nil :height 160 :weight 'normal :width 'normal :font "Source Code Pro") (when (eq system-type 'darwin) (setq ns-use-native-fullscreen nil) (setq mac-allow-anti-aliasing t))) -- cgit 1.4.1