diff --git a/src/commands/edit.lisp b/src/commands/edit.lisp index 8b02e3598..86b6a7a93 100644 --- a/src/commands/edit.lisp +++ b/src/commands/edit.lisp @@ -212,13 +212,17 @@ (let ((end (current-point))) (kill-region start end)))))))) -(define-command kill-whole-line () () - "Kill the entire line and the remaining whitespace" - (with-point ((start (current-point)) - (end (current-point))) - (line-end end) - (kill-region start end)) - (delete-previous-char)) +(define-command kill-whole-line (n) (:universal) + "If n is positive, kill n whole lines forward starting +at the beginning of the current line. If n is 0, do nothing. +And if n is negative, kill n lines above without deleting +anything the current line." + (cond ((zerop n) nil) + ((minusp n) (save-excursion + (move-to-beginning-of-logical-line) + (kill-line n))) + (t (progn (move-to-beginning-of-logical-line) + (kill-line n))))) (defun yank-string (point string) (change-yank-start point diff --git a/src/ext/isearch.lisp b/src/ext/isearch.lisp index 09ed6f192..1cd8553a4 100644 --- a/src/ext/isearch.lisp +++ b/src/ext/isearch.lisp @@ -83,6 +83,8 @@ (define-key *global-keymap* "M-s p" 'isearch-prev-highlight) (define-key *global-keymap* "F3" 'isearch-next-highlight) (define-key *global-keymap* "Shift-F3" 'isearch-prev-highlight) +(define-key *global-keymap* "M-s t" 'isearch-toggle-highlighting) +(define-key *global-keymap* "M-s M-t" 'isearch-toggle-highlighting) (define-key *isearch-keymap* "C-M-n" 'isearch-add-cursor-to-next-match) (defun disable-hook () @@ -305,6 +307,7 @@ (subseq *isearch-string* 0 (1- (length *isearch-string*)))) + (funcall *isearch-search-function* (current-point) *isearch-string*) (isearch-update-display))) (define-command isearch-raw-insert () () @@ -394,6 +397,7 @@ (let ((str (yank-from-clipboard-or-killring))) (when str (setq *isearch-string* str) + (funcall *isearch-search-function* (current-point) *isearch-string*) (isearch-update-display)))) (defun isearch-add-char (c)