Map on lines in Emacs
;;;-------------------------------------------------------------------- (defun u:map-lines (beg end func) "Call given FUNC in the form (LAMBDA (LBEG LEND LSTR LCOUNT)...) for every line in the region. By default just print them." (interactive "r\nXMap Function ((LAMBDA (LSTR LBEG LEND LCOUNT) ...)): ") (let ((count 1) (inhibit-field-text-motion t)) (when (stringp func) (setq func (car (read (eval (concat "(" func ")")))))) (unless func (setq func #'(lambda (s b e c) (princ (format "%4d:%s" c s))))) (save-excursion (save-match-data (goto-char beg) (let (lbeg lend lstr (delta (- (point-max) end))) (while ( (setq lbeg (line-beginning-position 1)) (setq lend (line-beginning-position 2)) (setq lstr (buffer-substring-no-properties lbeg lend)) (funcall...