Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. (defun cavd-upcase-rectangle-line (startcol endcol fill)
  2. (when (= (move-to-column startcol (if fill t 'coerce)) startcol)
  3. (upcase-region
  4. (point)
  5. (progn
  6. (move-to-column endcol 'coerce)
  7. (point)))))
  8.  
  9. (defun cavd-upcase-rectangle (start end)
  10. "Upcase rectangle contents on each line."
  11. (interactive
  12. (progn (barf-if-buffer-read-only)
  13. (list
  14. (region-beginning)
  15. (region-end))))
  16. (goto-char
  17. (apply-on-rectangle 'cavd-upcase-rectangle-line start end nil)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement