123 |
;; Turning off undo is OK since (spaces + newlines) is |
;; Turning off undo is OK since (spaces + newlines) is |
124 |
;; conserved, except for a corner case in |
;; conserved, except for a corner case in |
125 |
;; longlines-wrap-lines that we'll never encounter from here |
;; longlines-wrap-lines that we'll never encounter from here |
126 |
(longlines-decode-region (point-min) (point-max)) |
(save-restriction |
127 |
|
(widen) |
128 |
|
(longlines-decode-region (point-min) (point-max))) |
129 |
(longlines-wrap-region (point-min) (point-max)) |
(longlines-wrap-region (point-min) (point-max)) |
130 |
(set-buffer-modified-p mod)) |
(set-buffer-modified-p mod)) |
131 |
(when (and longlines-show-hard-newlines |
(when (and longlines-show-hard-newlines |
143 |
(longlines-unshow-hard-newlines)) |
(longlines-unshow-hard-newlines)) |
144 |
(let ((buffer-undo-list t) |
(let ((buffer-undo-list t) |
145 |
(inhibit-read-only t)) |
(inhibit-read-only t)) |
146 |
(longlines-encode-region (point-min) (point-max))) |
(save-restriction |
147 |
|
(widen) |
148 |
|
(longlines-encode-region (point-min) (point-max)))) |
149 |
(remove-hook 'change-major-mode-hook 'longlines-mode-off t) |
(remove-hook 'change-major-mode-hook 'longlines-mode-off t) |
150 |
(remove-hook 'before-kill-functions 'longlines-encode-region t) |
(remove-hook 'before-kill-functions 'longlines-encode-region t) |
151 |
(remove-hook 'after-change-functions 'longlines-after-change-function t) |
(remove-hook 'after-change-functions 'longlines-after-change-function t) |