[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.
(save-excursion
(goto-char beforepos)
(beginning-of-line)
(and (looking-at "[ \t]$")
(> (current-left-margin) 0)
(delete-region (point)
(line-end-position))))
(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]+$"?
Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
- Bug in simple.el?,
Marcin Borkowski <=