From bfaba9a4af3fa5bc98446b902aa24235be071cef Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 21 Mar 2019 02:17:26 +0100 Subject: [PATCH] Only kill-region and kill-ring-save act on the whole line. --- init.el | 24 ++++++++++++++---------- server/server | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/init.el b/init.el index d23a748..4442f13 100644 --- a/init.el +++ b/init.el @@ -87,16 +87,20 @@ (setq user-login-name "tastytea" user-mail-address "tastytea@tastytea.de") -;; Region commands act on the current line if no text is visually selected +;; kill-region (cut) and kill-ring-save (copy) act on the current line if no +;; text is visually selected ;; https://www.emacswiki.org/emacs/WholeLineOrRegion -(do-all-symbols (symbol) - (when (and (commandp symbol t) - (string-match-p "-region$\\|kill-ring-save" (symbol-name symbol))) - (put symbol 'interactive-form - '(interactive - (if (use-region-p) - (list (region-beginning) (region-end)) - (list (line-beginning-position) (line-beginning-position 2))))))) +(put 'kill-ring-save 'interactive-form + '(interactive + (if (use-region-p) + (list (region-beginning) (region-end)) + (list (line-beginning-position) (line-beginning-position 2))))) + +(put 'kill-region 'interactive-form + '(interactive + (if (use-region-p) + (list (region-beginning) (region-end)) + (list (line-beginning-position) (line-beginning-position 2))))) ;; Banish customizations to another file (setq custom-file (concat user-emacs-directory "custom.el")) @@ -108,7 +112,7 @@ ;; https://www.emacswiki.org/emacs/CleanBufferList (use-package midnight :config - (setq midnight-period (* 2 60 60) ; Clean every 2 hours + (setq midnight-period (* 1 60 60) ; Clean every 1 hours clean-buffer-list-delay-general 1 ; Clean normal bufs after 1d clean-buffer-list-delay-special (* 30 60) ; Clean special bufs after 30m clean-buffer-list-kill-regexps ; Add these to special buffers diff --git a/server/server b/server/server index bcd1a7d..fac88bd 100644 --- a/server/server +++ b/server/server @@ -1,2 +1,2 @@ -127.0.0.1:51313 6478 +127.0.0.1:51313 12458 phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh \ No newline at end of file