diff options
| author | Chong Yidong | 2009-07-15 02:05:32 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-07-15 02:05:32 +0000 |
| commit | 2066b4fe21ed0e925edbc3eff9ebf37be74ee77e (patch) | |
| tree | 836d382aadf2314b69c27c89c5bdc143f70518ed | |
| parent | b40c84b07f27cb9a7b6cef59438f30b0b07b0cac (diff) | |
| download | emacs-2066b4fe21ed0e925edbc3eff9ebf37be74ee77e.tar.gz emacs-2066b4fe21ed0e925edbc3eff9ebf37be74ee77e.zip | |
* simple.el (kill-visual-line): Obey kill-whole-line (Bug#3695).
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/simple.el | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0215d0aead6..4120f6e1c58 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2009-07-15 Chong Yidong <cyd@stupidchicken.com> | 1 | 2009-07-15 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 2 | ||
| 3 | * simple.el (kill-visual-line): Obey kill-whole-line (Bug#3695). | ||
| 4 | |||
| 5 | 2009-07-15 Chong Yidong <cyd@stupidchicken.com> | ||
| 6 | |||
| 3 | * simple.el (deactivate-mark): Optional argument FORCE. | 7 | * simple.el (deactivate-mark): Optional argument FORCE. |
| 4 | (set-mark): Use deactivate-mark. | 8 | (set-mark): Use deactivate-mark. |
| 5 | 9 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index 68966cf95a7..959076b11cb 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -4533,7 +4533,8 @@ even beep.)" | |||
| 4533 | (interactive "P") | 4533 | (interactive "P") |
| 4534 | ;; Like in `kill-line', it's better to move point to the other end | 4534 | ;; Like in `kill-line', it's better to move point to the other end |
| 4535 | ;; of the kill before killing. | 4535 | ;; of the kill before killing. |
| 4536 | (let ((opoint (point))) | 4536 | (let ((opoint (point)) |
| 4537 | (kill-whole-line (and kill-whole-line (bolp)))) | ||
| 4537 | (if arg | 4538 | (if arg |
| 4538 | (vertical-motion (prefix-numeric-value arg)) | 4539 | (vertical-motion (prefix-numeric-value arg)) |
| 4539 | (end-of-visual-line 1) | 4540 | (end-of-visual-line 1) |
| @@ -4545,7 +4546,9 @@ even beep.)" | |||
| 4545 | ;; whether the trailing whitespace is highlighted. But, it's | 4546 | ;; whether the trailing whitespace is highlighted. But, it's |
| 4546 | ;; OK to just do this unconditionally. | 4547 | ;; OK to just do this unconditionally. |
| 4547 | (skip-chars-forward " \t"))) | 4548 | (skip-chars-forward " \t"))) |
| 4548 | (kill-region opoint (point)))) | 4549 | (kill-region opoint (if (and kill-whole-line (looking-at "\n")) |
| 4550 | (1+ (point)) | ||
| 4551 | (point))))) | ||
| 4549 | 4552 | ||
| 4550 | (defun next-logical-line (&optional arg try-vscroll) | 4553 | (defun next-logical-line (&optional arg try-vscroll) |
| 4551 | "Move cursor vertically down ARG lines. | 4554 | "Move cursor vertically down ARG lines. |