fixed #220 - load volatile-highlights after advising kill-line and kill-region
This commit is contained in:
parent
bfc7af2aaf
commit
46d39475de
2 changed files with 17 additions and 16 deletions
|
@ -119,22 +119,6 @@ the curson at its beginning, according to the current mode."
|
||||||
(transpose-lines 1)
|
(transpose-lines 1)
|
||||||
(forward-line -1))
|
(forward-line -1))
|
||||||
|
|
||||||
;; add the ability to copy and cut the current line, without marking it
|
|
||||||
(defadvice kill-ring-save (before slick-copy activate compile)
|
|
||||||
"When called interactively with no active region, copy a single line instead."
|
|
||||||
(interactive
|
|
||||||
(if mark-active (list (region-beginning) (region-end))
|
|
||||||
(message "Copied line")
|
|
||||||
(list (line-beginning-position)
|
|
||||||
(line-beginning-position 2)))))
|
|
||||||
|
|
||||||
(defadvice kill-region (before slick-cut activate compile)
|
|
||||||
"When called interactively with no active region, kill a single line instead."
|
|
||||||
(interactive
|
|
||||||
(if mark-active (list (region-beginning) (region-end))
|
|
||||||
(list (line-beginning-position)
|
|
||||||
(line-beginning-position 2)))))
|
|
||||||
|
|
||||||
(defun prelude-indent-buffer ()
|
(defun prelude-indent-buffer ()
|
||||||
"Indents the entire buffer."
|
"Indents the entire buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
|
@ -143,6 +143,23 @@
|
||||||
(require 'volatile-highlights)
|
(require 'volatile-highlights)
|
||||||
(volatile-highlights-mode t)
|
(volatile-highlights-mode t)
|
||||||
|
|
||||||
|
;; note - this should be after volatile-highlights is required
|
||||||
|
;; add the ability to copy and cut the current line, without marking it
|
||||||
|
(defadvice kill-ring-save (before slick-copy activate compile)
|
||||||
|
"When called interactively with no active region, copy a single line instead."
|
||||||
|
(interactive
|
||||||
|
(if mark-active (list (region-beginning) (region-end))
|
||||||
|
(message "Copied line")
|
||||||
|
(list (line-beginning-position)
|
||||||
|
(line-beginning-position 2)))))
|
||||||
|
|
||||||
|
(defadvice kill-region (before slick-cut activate compile)
|
||||||
|
"When called interactively with no active region, kill a single line instead."
|
||||||
|
(interactive
|
||||||
|
(if mark-active (list (region-beginning) (region-end))
|
||||||
|
(list (line-beginning-position)
|
||||||
|
(line-beginning-position 2)))))
|
||||||
|
|
||||||
;; tramp, for sudo access
|
;; tramp, for sudo access
|
||||||
(require 'tramp)
|
(require 'tramp)
|
||||||
;; keep in mind known issues with zsh - see emacs wiki
|
;; keep in mind known issues with zsh - see emacs wiki
|
||||||
|
|
Loading…
Reference in a new issue