help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hline


From: Marcin Borkowski
Subject: Re: hline
Date: Thu, 07 Jan 2021 16:23:20 +0100
User-agent: mu4e 1.1.0; emacs 28.0.50

On 2021-01-07, at 07:21, Emanuel Berg via Users list for the GNU Emacs text 
editor <help-gnu-emacs@gnu.org> wrote:

> (defun hline (&optional char)
>   (interactive "P")
>   (let ((len (- (window-width) (current-column) 1))
>         (c (or char ?-)) )
>     (insert (make-string len c)) ))

Funny how I wrote an almost identical function just two days ago...
Though I used (1- (window-width)), since in my use case I knew that
(current-column) would be zero.

Anybody knows why it is necessary to subtract 1?

Best,

--
Marcin Borkowski
http://mbork.pl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]