[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
kill-visual-line / line-move, goal column etc.
From: |
David Reitter |
Subject: |
kill-visual-line / line-move, goal column etc. |
Date: |
Sat, 2 Aug 2008 23:21:36 +0200 |
kill-visual-line behaves incorrectly when a temporary goal column is
set, or when line-move does something sensible but (here) undesirable.
The attached patch takes care of that- however, I'm not sure if just
using `vertical-motion' handles the cases of fields and invisible text
right. (But I'm unsure if line-move itself would DTRT...) Comments
appreciated.
*** simple.el 02 Aug 2008 20:35:34 +0200 1.941
--- simple.el 02 Aug 2008 23:16:20 +0200
***************
*** 4435,4441 ****
(if (eobp)
(signal 'end-of-buffer nil))
(setq end (save-excursion
! (end-of-visual-line) (point)))
(if (or (save-excursion
;; If trailing whitespace is visible,
;; don't treat it as nothing.
--- 4435,4444 ----
(if (eobp)
(signal 'end-of-buffer nil))
(setq end (save-excursion
! (vertical-motion 1)
! ;; we're possibly one too far
! (skip-chars-backward "\r\n" (- (point) 1))
! (point)))
(if (or (save-excursion
;; If trailing whitespace is visible,
;; don't treat it as nothing.
***************
*** 4443,4449 ****
(skip-chars-forward " \t" end))
(= (point) end))
(and kill-whole-line (bolp)))
! (line-move 1)
(goto-char end)))
(kill-region opoint (point))))
--- 4446,4452 ----
(skip-chars-forward " \t" end))
(= (point) end))
(and kill-whole-line (bolp)))
! (vertical-motion 1)
(goto-char end)))
(kill-region opoint (point))))
smime.p7s
Description: S/MIME cryptographic signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- kill-visual-line / line-move, goal column etc.,
David Reitter <=