unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Underline the current line (function inside)
@ 2021-06-11 14:32 Jean Louis
  2021-06-11 14:52 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Jean Louis @ 2021-06-11 14:32 UTC (permalink / raw)
  To: Help GNU Emacs

This function is handy to underline the current line:

(defun underline-line ()
  "Underline the current line."
  (interactive)
  (let* ((start (line-beginning-position))
	 (end (line-end-position))
	 (length (- end start)))
    (end-of-line)
    (newline)
    (insert (make-string length ?=))
    (newline)))


When there is a line like this, a key binding or M-x underline-line
===================================================================

does that underlining as above.



Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-11 17:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-11 14:32 Underline the current line (function inside) Jean Louis
2021-06-11 14:52 ` Eli Zaretskii
2021-06-11 15:33   ` Jean Louis
2021-06-11 17:55     ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).