mirror of
https://github.com/vale981/boon
synced 2025-03-04 17:11:40 -05:00
no need for reg normalisation
This commit is contained in:
parent
998c766f11
commit
a1281e0434
2 changed files with 3 additions and 6 deletions
|
@ -190,7 +190,7 @@ the region, in insertion mode. Subregions won't be overlapping."
|
|||
(defun boon-select-borders (how-much regs)
|
||||
"Return the bordering (of size HOW-MUCH) of a region list REGS."
|
||||
(interactive (list (prefix-numeric-value current-prefix-arg) (boon-spec-selector "select contents")))
|
||||
(lambda ()(apply 'append (mapcar (lambda (reg) (boon-borders reg how-much)) (mapcar 'boon-normalize-reg (funcall regs))))))
|
||||
(lambda ()(apply 'append (mapcar (lambda (reg) (boon-borders reg how-much)) (funcall regs)))))
|
||||
|
||||
(defun boon-select-with-spaces (regs)
|
||||
"Return the regions REGS, including some surrounding spaces on one side."
|
||||
|
@ -200,7 +200,7 @@ the region, in insertion mode. Subregions won't be overlapping."
|
|||
(defun boon-select-content (regs)
|
||||
"Return the contents (of size HOW-MUCH) of a region list REGS."
|
||||
(interactive (list (boon-spec-selector "select borders")))
|
||||
(lambda ()(mapcar 'boon-content (mapcar 'boon-normalize-reg (funcall regs)))))
|
||||
(lambda ()(mapcar 'boon-content (funcall regs))))
|
||||
|
||||
(defun boon-bypass-mc ()
|
||||
"Should we bypass multiple cursors when gathering regions?"
|
||||
|
|
|
@ -27,15 +27,12 @@
|
|||
(defun boon-reg-cursor (reg)
|
||||
(caddr reg))
|
||||
|
||||
(defun boon-normalize-reg (reg)
|
||||
"Normalize the region REG by making sure that mark < point."
|
||||
(boon-mk-reg (boon-reg-begin reg) (boon-reg-end reg) (boon-reg-cursor reg)))
|
||||
|
||||
(defun boon-reg-to-markers (reg)
|
||||
"Put copy the markers defining REG borders, and return that."
|
||||
(boon-mk-reg (copy-marker (boon-reg-mark reg)) (copy-marker (boon-reg-point reg)) (boon-reg-cursor reg)))
|
||||
|
||||
(defun boon-reg-from-markers (reg)
|
||||
"Put convert markers to numbers in REG."
|
||||
(boon-mk-reg (marker-position (boon-reg-mark reg)) (marker-position (boon-reg-point reg)) (boon-reg-cursor reg)))
|
||||
|
||||
(defun boon-borders (reg how-much)
|
||||
|
|
Loading…
Add table
Reference in a new issue