diff --git a/um.el b/um.el index 1889bfd..5a222c5 100644 --- a/um.el +++ b/um.el @@ -455,7 +455,15 @@ Optional TAGS string may contain more than one tag separated by a comma. \\{um-mode-map} " - (read-only-mode) - ) + ;; restrict movement to (bolp) with cursor-intangible-mode + (save-excursion + (goto-char (point-min)) + (while (not (eobp)) + ;; NOTE: actually the newline is the only position not included, but this + ;; positions the cursor visually at the bol: + (put-text-property (pos-bol) (pos-eol) 'cursor-intangible t) + (forward-line 1))) + (cursor-intangible-mode) + (read-only-mode)) (provide 'um)