Only kill-region and kill-ring-save act on the whole line.
This commit is contained in:
parent
5988e3c59b
commit
bfaba9a4af
24
init.el
24
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
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
127.0.0.1:51313 6478
|
||||
127.0.0.1:51313 12458
|
||||
phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh
|
Loading…
Reference in New Issue
Block a user