Commit 2441692d authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(set-fill-prefix): Cancel fill prefix if point

is in front of the left-margin, if any.
parent 30f824ce
2001-01-31 Gerd Moellmann <gerd@gnu.org>
 
* textmodes/fill.el (set-fill-prefix): Cancel fill prefix if point
is in front of the left-margin, if any.
* simple.el (delete-key-deletes-forward-mode): Treat `kp-delete'
like `delete'.
 
......
......@@ -74,11 +74,13 @@ See the documentation of `kinsoku' for more information.")
Filling expects lines to start with the fill prefix and
reinserts the fill prefix in each resulting line."
(interactive)
(setq fill-prefix (buffer-substring
(save-excursion (move-to-left-margin) (point))
(point)))
(if (equal fill-prefix "")
(setq fill-prefix nil))
(let ((left-margin-pos (save-excursion (move-to-left-margin) (point))))
(if (> (point) left-margin-pos)
(progn
(setq fill-prefix (buffer-substring left-margin-pos (point)))
(if (equal fill-prefix "")
(setq fill-prefix nil)))
(setq fill-prefix nil)))
(if fill-prefix
(message "fill-prefix: \"%s\"" fill-prefix)
(message "fill-prefix cancelled")))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment