[Top][All Lists]

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

Bug in simple.el?

From: Marcin Borkowski
Subject: Bug in simple.el?
Date: Fri, 16 Jan 2015 00:02:58 +0100

Hello there,

either there is a bug in simple.el (the `newline' function), or I don't
understand something.

Here's an excerpt:

  (let* ((was-page-start (and (bolp) (looking-at page-delimiter)))
            ;; (some code cut from here)
            ;; If the newline leaves the previous line blank, and we
            ;; have a left margin, delete that from the blank line.
              (goto-char beforepos)
              (and (looking-at "[ \t]$")
                   (> (current-left-margin) 0)
                   (delete-region (point)

(BTW: page-delimiter is by default "^^L", i.e. caret and C-l, so the
(and (bolp) ...) seems to be spurious.)

But my real problem with the above code is the (looking-at "[ \t]$")
part.  Shouldn't the regex be "[ \t]+$"?


Marcin Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University

reply via email to

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