summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <fcuny@twitter.com>2019-02-16 11:45:45 -0800
committerFranck Cuny <fcuny@twitter.com>2019-02-16 11:45:45 -0800
commit15e95c366fef562b71b43c1e6ab909ecf16845bc (patch)
tree001e2ef262238646ac96c6580f48337091da17e8
parent[emacs] Same font size as my terminal. (diff)
downloademacs.d-15e95c366fef562b71b43c1e6ab909ecf16845bc.tar.gz
[emacs] Add a function to select and copy buffer.
-rw-r--r--emacs.d/init.el9
1 files changed, 8 insertions, 1 deletions
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)))