Here’s an elisp function that will just underline your current text. It’s simple, awesome and I use it all the time for my titles. You can put it in the *scratch* and do a C-x C-e and then call it with M-x add-underlining.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
(defun add-underlining () "Underline titles with an equal sign" (interactive (save-excursion (let* ((initial-line (line-number-at-pos)) (end-of-line) (end-col (current-column)) (s (make-string end-col ?=))) (interactive) (forward-line 1) (if (= initial-line (line-number-at-pos)) (progn (newline) (insert s)) (insert s)))))) |