[mew-dist 24332] Cursor motion
Hideyuki SHIRAI ( 白井秀行 )
shirai at example.com
2004年 1月 8日 (木) 20:24:24 JST
summary 上で普通に C-n, C-p しているつもりなのに行頭にカーソルが
移動するのはちょっとイヤなので。。。(数値前置引数つき)
(defun mew-summary-next-line (&optional arg)
(interactive "p")
(or arg (setq arg 1))
(if (< arg 0)
(mew-summary-previous-line (- arg))
(let ((col (current-column)))
(while (> arg 0)
(forward-line)
(while (or (looking-at mew-regex-thread-separator)
(eq (get-text-property (point) 'invisible) t))
(forward-line))
(setq arg (1- arg)))
(move-to-column col))))
(defun mew-summary-previous-line (&optional arg)
(interactive "p")
(or arg (setq arg 1))
(if (< arg 0)
(mew-summary-next-line (- arg))
(let ((col (current-column)))
(while (> arg 0)
(forward-line -1)
(while (or (looking-at mew-regex-thread-separator)
(eq (get-text-property (point) 'invisible) t))
(forward-line -1))
(setq arg (1- arg)))
(move-to-column col))))
--
白井秀行 (mailto:shirai at example.com)
Mew-dist メーリングリストの案内