Function: majutsu-row-filter-buffer-substring
majutsu-row-filter-buffer-substring is a natively compiled function
defined in majutsu-row.el.
Signature
(majutsu-row-filter-buffer-substring BEG END &optional DELETE)
Documentation
Filter copied row text between BEG and END.
Drops tail text when both heading and tail are present in the copied region.
Source Code
;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-row.el
(defun majutsu-row-filter-buffer-substring (beg end &optional delete)
"Filter copied row text between BEG and END.
Drops tail text when both heading and tail are present in the copied region."
(let ((string (buffer-substring--filter beg end delete))
(trim-tail nil))
(when (and (stringp string)
(majutsu-row-string-has-module-p string 'heading)
(majutsu-row-string-has-module-p string 'tail))
(setq string (majutsu-row-string-remove-module string 'tail))
(setq trim-tail t))
(setq string (majutsu-row-cleanup-copied-string string))
(when (and trim-tail (stringp string))
(setq string (replace-regexp-in-string "[ \t]+$" "" string)))
string))