um-mode : restrict movement to bolp with cursor-intangible-mode
This commit is contained in:
parent
f9a988630e
commit
e6abab09a9
1 changed files with 10 additions and 2 deletions
12
um.el
12
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue