all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.