Only kill-region and kill-ring-save act on the whole line.
This commit is contained in:
parent
5988e3c59b
commit
bfaba9a4af
18
init.el
18
init.el
|
@ -87,16 +87,20 @@
|
||||||
(setq user-login-name "tastytea"
|
(setq user-login-name "tastytea"
|
||||||
user-mail-address "tastytea@tastytea.de")
|
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
|
;; https://www.emacswiki.org/emacs/WholeLineOrRegion
|
||||||
(do-all-symbols (symbol)
|
(put 'kill-ring-save 'interactive-form
|
||||||
(when (and (commandp symbol t)
|
|
||||||
(string-match-p "-region$\\|kill-ring-save" (symbol-name symbol)))
|
|
||||||
(put symbol 'interactive-form
|
|
||||||
'(interactive
|
'(interactive
|
||||||
(if (use-region-p)
|
(if (use-region-p)
|
||||||
(list (region-beginning) (region-end))
|
(list (region-beginning) (region-end))
|
||||||
(list (line-beginning-position) (line-beginning-position 2)))))))
|
(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
|
;; Banish customizations to another file
|
||||||
(setq custom-file (concat user-emacs-directory "custom.el"))
|
(setq custom-file (concat user-emacs-directory "custom.el"))
|
||||||
|
@ -108,7 +112,7 @@
|
||||||
;; https://www.emacswiki.org/emacs/CleanBufferList
|
;; https://www.emacswiki.org/emacs/CleanBufferList
|
||||||
(use-package midnight
|
(use-package midnight
|
||||||
:config
|
: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-general 1 ; Clean normal bufs after 1d
|
||||||
clean-buffer-list-delay-special (* 30 60) ; Clean special bufs after 30m
|
clean-buffer-list-delay-special (* 30 60) ; Clean special bufs after 30m
|
||||||
clean-buffer-list-kill-regexps ; Add these to special buffers
|
clean-buffer-list-kill-regexps ; Add these to special buffers
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
127.0.0.1:51313 6478
|
127.0.0.1:51313 12458
|
||||||
phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh
|
phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh
|
Loading…
Reference in New Issue
Block a user