mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-20 18:17:20 +00:00
(set-fill-prefix): Cancel fill prefix if point
is in front of the left-margin, if any.
This commit is contained in:
parent
30f824ceab
commit
2441692dc8
@ -1,5 +1,8 @@
|
||||
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")))
|
||||
|
Loading…
Reference in New Issue
Block a user