mirror of
https://github.com/vale981/boon
synced 2025-03-05 17:41:42 -05:00
oops
This commit is contained in:
parent
40fab18e95
commit
5455990575
1 changed files with 5 additions and 4 deletions
|
@ -143,18 +143,19 @@ NOTE: Do not run for every cursor."
|
|||
(yank))
|
||||
|
||||
(defun boon-need-space ()
|
||||
"Is it necessary to insert a space here to separate words?"
|
||||
(and (looking-at "\\sw\\|\\s(") (looking-back "\\sw\\|\\s)")))
|
||||
|
||||
(defun boon-splice-with-spaces ()
|
||||
"Yank, replacing the region if it is active, and fix the
|
||||
surroundings so that they become nicely spaced."
|
||||
"Yank, replacing the region if it is active.
|
||||
Fix the surroundings so that they become nicely spaced."
|
||||
(interactive)
|
||||
(boon-extract-region)
|
||||
(yank)
|
||||
(when (boon-need-space) (insert " "))
|
||||
(save-excursion
|
||||
(goto-char (mark))
|
||||
(when (boon-need-space))))
|
||||
(when (boon-need-space) (insert " "))))
|
||||
|
||||
(defun boon-line-prefix ()
|
||||
"Return the text between beginning of line and position."
|
||||
|
@ -172,7 +173,7 @@ surroundings so that they become nicely spaced."
|
|||
"Return non-nil if the point is at the current line indentation; or to the right."
|
||||
(or (eolp)
|
||||
(and (not (boon-at-indent-p))
|
||||
(string-blank-p (boon-line-prefix))))))
|
||||
(string-blank-p (boon-line-prefix)))))
|
||||
|
||||
(defun boon-at-indent-p ()
|
||||
"Return non-nil if the point is at the current line indentation."
|
||||
|
|
Loading…
Add table
Reference in a new issue