108 |
(set (make-local-variable 'require-final-newline) nil) |
(set (make-local-variable 'require-final-newline) nil) |
109 |
(add-to-list 'buffer-file-format 'longlines) |
(add-to-list 'buffer-file-format 'longlines) |
110 |
(add-hook 'change-major-mode-hook 'longlines-mode-off nil t) |
(add-hook 'change-major-mode-hook 'longlines-mode-off nil t) |
111 |
|
(add-hook 'before-revert-hook 'longlines-before-revert-hook nil t) |
112 |
(make-local-variable 'buffer-substring-filters) |
(make-local-variable 'buffer-substring-filters) |
113 |
(set (make-local-variable 'isearch-search-fun-function) |
(set (make-local-variable 'isearch-search-fun-function) |
114 |
'longlinges-search-function) |
'longlinges-search-function) |
167 |
(remove-hook 'before-kill-functions 'longlines-encode-region t) |
(remove-hook 'before-kill-functions 'longlines-encode-region t) |
168 |
(remove-hook 'after-change-functions 'longlines-after-change-function t) |
(remove-hook 'after-change-functions 'longlines-after-change-function t) |
169 |
(remove-hook 'post-command-hook 'longlines-post-command-function t) |
(remove-hook 'post-command-hook 'longlines-post-command-function t) |
170 |
|
(remove-hook 'before-revert-hook 'longlines-before-revert-hook t) |
171 |
(remove-hook 'window-configuration-change-hook |
(remove-hook 'window-configuration-change-hook |
172 |
'longlines-window-change-function t) |
'longlines-window-change-function t) |
173 |
(when longlines-wrap-follows-window-size |
(when longlines-wrap-follows-window-size |
432 |
|
|
433 |
;; Loading and saving |
;; Loading and saving |
434 |
|
|
435 |
|
(defun longlines-before-revert-hook () |
436 |
|
(add-hook 'after-revert-hook 'longlines-after-revert-hook nil t) |
437 |
|
(longlines-mode 0)) |
438 |
|
|
439 |
|
(defun longlines-after-revert-hook () |
440 |
|
(remove-hook 'after-revert-hook 'longlines-after-revert-hook t) |
441 |
|
(longlines-mode 1)) |
442 |
|
|
443 |
(add-to-list |
(add-to-list |
444 |
'format-alist |
'format-alist |
445 |
(list 'longlines "Automatically wrap long lines." nil |
(list 'longlines-encode "Encode long lines." nil nil |
446 |
'longlines-decode-region 'longlines-encode-region t nil)) |
'longlines-encode-region t nil)) |
447 |
|
|
448 |
(provide 'longlines) |
(provide 'longlines) |
449 |
|
|