Advertisement
Guest User

dwchapin

a guest
Feb 3rd, 2010
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.68 KB | None | 0 0
  1. ;; elisp functions for underlining things in text mode
  2. ;;
  3. ;; dwchapin 27-Nov-07
  4.  
  5. (defun underline-previous-line (char)
  6.   (interactive)
  7.   (forward-line -1)
  8.   (beginning-of-line)
  9.   (setq beg (point))
  10.   (end-of-line)
  11.   (setq count (- (point) beg ))
  12.   (beginning-of-line)
  13.   (forward-line 1)
  14.   (dotimes (i count)
  15.     (insert char))
  16.   (newline))
  17.  
  18. (defun underline-previous-line-with-dash ()
  19.   (interactive)
  20.   (underline-previous-line "-"))
  21.  
  22. (defun underline-previous-line-with-equals ()
  23.   (interactive)
  24.   (underline-previous-line "="))
  25.  
  26.  
  27. (global-set-key [(control ?-)] 'underline-previous-line-with-dash)
  28. (global-set-key [(control ?=)] 'underline-previous-line-with-equals)
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement