comparison lisp/emulation/vi.el @ 9865:9ca8b94a9f07

(vi-kill-region): Pass args to kill-region. (vi-mark-region): Don't pass unexpected args.
author Karl Heuer <kwzh@gnu.org>
date Wed, 09 Nov 1994 06:10:46 +0000
parents 6f9b0830f124
children 6878430e42fa
comparison
equal deleted inserted replaced
9864:0299d64cdd07 9865:9ca8b94a9f07
569 "kill specified number of lines (=d$), text saved in the kill ring." 569 "kill specified number of lines (=d$), text saved in the kill ring."
570 (interactive "*P") 570 (interactive "*P")
571 (kill-line arg) 571 (kill-line arg)
572 (vi-set-last-change-command 'kill-line arg)) 572 (vi-set-last-change-command 'kill-line arg))
573 573
574 (defun vi-kill-region () 574 (defun vi-kill-region (start end)
575 (interactive) 575 (interactive "*r")
576 (kill-region) 576 (kill-region start end)
577 (vi-set-last-change-command 'kill-region)) 577 (vi-set-last-change-command 'kill-region))
578 578
579 (defun vi-append-at-end-of-line (arg) 579 (defun vi-append-at-end-of-line (arg)
580 "go to end of line and then go into vi insert state." 580 "go to end of line and then go into vi insert state."
581 (interactive "*p") 581 (interactive "*p")
1354 (defun vi-mark-region (arg region) 1354 (defun vi-mark-region (arg region)
1355 "Mark region appropriately. The next char REGION is d(efun),s(-exp),b(uffer), 1355 "Mark region appropriately. The next char REGION is d(efun),s(-exp),b(uffer),
1356 p(aragraph), P(age), f(unction in C/Pascal etc.), w(ord), e(nd of sentence), 1356 p(aragraph), P(age), f(unction in C/Pascal etc.), w(ord), e(nd of sentence),
1357 l(ines)." 1357 l(ines)."
1358 (interactive "p\nc") 1358 (interactive "p\nc")
1359 (cond ((char-equal region ?d) (mark-defun arg)) 1359 (cond ((char-equal region ?d) (mark-defun))
1360 ((char-equal region ?s) (mark-sexp arg)) 1360 ((char-equal region ?s) (mark-sexp arg))
1361 ((char-equal region ?b) (mark-whole-buffer)) 1361 ((char-equal region ?b) (mark-whole-buffer))
1362 ((char-equal region ?p) (mark-paragraph arg)) 1362 ((char-equal region ?p) (mark-paragraph))
1363 ((char-equal region ?P) (mark-page arg)) 1363 ((char-equal region ?P) (mark-page arg))
1364 ((char-equal region ?f) (mark-c-function arg)) 1364 ((char-equal region ?f) (mark-c-function))
1365 ((char-equal region ?w) (mark-word arg)) 1365 ((char-equal region ?w) (mark-word arg))
1366 ((char-equal region ?e) (mark-end-of-sentence arg)) 1366 ((char-equal region ?e) (mark-end-of-sentence arg))
1367 ((char-equal region ?l) (vi-mark-lines arg)) 1367 ((char-equal region ?l) (vi-mark-lines arg))
1368 (t (message "Mark: d(efun),s(-exp),b(uf),p(arag),P(age),f(unct),w(ord),e(os),l(ines)") 1368 (t (message "Mark: d(efun),s(-exp),b(uf),p(arag),P(age),f(unct),w(ord),e(os),l(ines)")
1369 (setq region (read-char)) 1369 (setq region (read-char))