Mercurial > hg > xemacs-beta
comparison lisp/viper/viper.el @ 144:318232e2a3f0 r20-2b6
Import from CVS: tag r20-2b6
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:34:14 +0200 |
parents | fe104dbd9147 |
children | 43dd3413c7c7 |
comparison
equal
deleted
inserted
replaced
143:50e7fedfe353 | 144:318232e2a3f0 |
---|---|
2923 (defun vip-goto-col (arg) | 2923 (defun vip-goto-col (arg) |
2924 "Go to ARG's column." | 2924 "Go to ARG's column." |
2925 (interactive "P") | 2925 (interactive "P") |
2926 (vip-leave-region-active) | 2926 (vip-leave-region-active) |
2927 (let ((val (vip-p-val arg)) | 2927 (let ((val (vip-p-val arg)) |
2928 (com (vip-getcom arg))) | 2928 (com (vip-getcom arg)) |
2929 line-len) | |
2930 (setq line-len (- (vip-line-pos 'end) (vip-line-pos 'start))) | |
2931 (if com (vip-move-marker-locally 'vip-com-point (point))) | |
2932 (beginning-of-line) | |
2933 (forward-char (1- (min line-len val))) | |
2934 (while (> (current-column) (1- val)) | |
2935 (backward-char 1)) | |
2936 (if com (vip-execute-com 'vip-goto-col val com)) | |
2929 (save-excursion | 2937 (save-excursion |
2930 (end-of-line) | 2938 (end-of-line) |
2931 (if (> val (1+ (current-column))) (error ""))) | 2939 (if (> val (current-column)) (error ""))) |
2932 (if com (vip-move-marker-locally 'vip-com-point (point))) | 2940 )) |
2933 (beginning-of-line) | |
2934 (forward-char (1- val)) | |
2935 (if com (vip-execute-com 'vip-goto-col val com)))) | |
2936 | 2941 |
2937 | 2942 |
2938 (defun vip-next-line (arg) | 2943 (defun vip-next-line (arg) |
2939 "Go to next line." | 2944 "Go to next line." |
2940 (interactive "P") | 2945 (interactive "P") |