mirror of
https://github.com/vale981/boon
synced 2025-03-06 01:51:38 -05:00
comments
This commit is contained in:
parent
b17ffc4e15
commit
9342ad1134
1 changed files with 7 additions and 5 deletions
12
boon-main.el
12
boon-main.el
|
@ -230,15 +230,15 @@
|
|||
(call-interactively 'boon-toggle-region-case)
|
||||
(boon-toggle-character-case)))
|
||||
|
||||
(defun boon-toggle-region-case (pos1 pos2)
|
||||
"Cycles the region between 3 capitalizations: UPPER CASE, lower case, Title Case."
|
||||
(defun boon-toggle-region-case (beg end)
|
||||
"Cycle the region between BEG and END through 3 capitalizations: UPPER CASE, lower case, Title Case."
|
||||
(interactive "r")
|
||||
(let* ((deactivate-mark nil)
|
||||
(case-fold-search nil)
|
||||
(cur-state (if (eq last-command this-command)
|
||||
(get this-command 'state)
|
||||
(save-excursion
|
||||
(goto-char pos1)
|
||||
(goto-char beg)
|
||||
(cond
|
||||
((looking-at "[[:upper:]][[:upper:]]") 'upcase-region)
|
||||
((looking-at "[[:upper:]][[:lower:]]") 'capitalize-region)
|
||||
|
@ -247,7 +247,7 @@
|
|||
(capitalize-region . upcase-region)
|
||||
(upcase-region . downcase-region)
|
||||
))))
|
||||
(funcall cur-state pos1 pos2)
|
||||
(funcall cur-state beg end)
|
||||
(put this-command 'state cur-state)))
|
||||
|
||||
(defun boon-toggle-mark ()
|
||||
|
@ -321,11 +321,13 @@ line."
|
|||
(insert (make-string indent-lvl 32))
|
||||
(boon-set-insert-state)))
|
||||
(defun boon-open-next-line-and-insert ()
|
||||
"Open the line after the current one."
|
||||
(interactive)
|
||||
(next-logical-line)
|
||||
(boon-open-line-and-insert))
|
||||
|
||||
(defun boon-open-line ()
|
||||
"Open the line before the current one."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(let ((line-prefix (boon-line-prefix)))
|
||||
|
@ -346,7 +348,7 @@ line."
|
|||
(pop-mark))))
|
||||
|
||||
(defun boon-switch-mark-quick ()
|
||||
"Pop marks until we find ourselves on a different line."
|
||||
"Pop the mark ring until we find ourselves on a different line."
|
||||
(interactive)
|
||||
(let ((orig-line (line-number-at-pos)))
|
||||
(while (> 1 (abs (- orig-line (line-number-at-pos))))
|
||||
|
|
Loading…
Add table
Reference in a new issue