- 294 名前:名無しさん@お腹いっぱい。 mailto:sage [2016/03/04(金) 04:17:37.56 .net]
- mc/region-strings が期待してたものと違ったのでこんなの作ってみました
(defun my-mc/all-region-strings () (let* (strings (cursors (mc/all-fake-cursors)) (tmp-list (and cursors (let ((lst (list (list (mark) (buffer-substring-no-properties (point) (mark)))))) (mapc #'(lambda (x) (let* ((beg (mc/cursor-beg x)) (end (mc/cursor-end x)) (str (buffer-substring-no-properties beg end))) (setq lst (append lst (list (list end str)))))) cursors) lst)))) (when tmp-list (setq tmp-list (sort tmp-list #'(lambda (a b) (< (car a) (car b))))) (mapc #'(lambda (x) (setq strings (append strings (list (car (cdr x)))))) tmp-list)) strings))
|

|