Mercurial > emacs
comparison lisp/longlines.el @ 66996:cf7bf8dadf78
*** empty log message ***
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Fri, 18 Nov 2005 19:42:08 +0000 |
parents | e10f2e7919f0 |
children | e220d76071f7 |
comparison
equal
deleted
inserted
replaced
66995:e10f2e7919f0 | 66996:cf7bf8dadf78 |
---|---|
130 (longlines-wrap-region (point-min) (point-max)) | 130 (longlines-wrap-region (point-min) (point-max)) |
131 (set-buffer-modified-p mod)) | 131 (set-buffer-modified-p mod)) |
132 (when (and longlines-show-hard-newlines | 132 (when (and longlines-show-hard-newlines |
133 (not longlines-showing)) | 133 (not longlines-showing)) |
134 (longlines-show-hard-newlines)) | 134 (longlines-show-hard-newlines)) |
135 (when longlines-auto-wrap | |
136 (auto-fill-mode 0) | |
137 (add-hook 'after-change-functions | |
138 'longlines-after-change-function nil t) | |
139 (add-hook 'post-command-hook | |
140 'longlines-post-command-function nil t)) | |
141 | 135 |
142 ;; Hacks to make longlines play nice with various modes. | 136 ;; Hacks to make longlines play nice with various modes. |
143 (cond ((eq major-mode 'mail-mode) | 137 (cond ((eq major-mode 'mail-mode) |
144 (or mail-citation-hook | 138 (or mail-citation-hook |
145 (add-hook 'mail-citation-hook 'mail-indent-citation nil t)) | 139 (add-hook 'mail-citation-hook 'mail-indent-citation nil t)) |
149 (if (not (listp message-indent-citation-function)) | 143 (if (not (listp message-indent-citation-function)) |
150 (setq message-indent-citation-function | 144 (setq message-indent-citation-function |
151 (list message-indent-citation-function))) | 145 (list message-indent-citation-function))) |
152 (add-to-list 'message-indent-citation-function | 146 (add-to-list 'message-indent-citation-function |
153 'longlines-decode-region t))) | 147 'longlines-decode-region t))) |
154 ) | 148 |
149 (when longlines-auto-wrap | |
150 (auto-fill-mode 0) | |
151 (add-hook 'after-change-functions | |
152 'longlines-after-change-function nil t) | |
153 (add-hook 'post-command-hook | |
154 'longlines-post-command-function nil t))) | |
155 ;; Turn off longlines mode | 155 ;; Turn off longlines mode |
156 (setq buffer-file-format (delete 'longlines buffer-file-format)) | 156 (setq buffer-file-format (delete 'longlines buffer-file-format)) |
157 (if longlines-showing | 157 (if longlines-showing |
158 (longlines-unshow-hard-newlines)) | 158 (longlines-unshow-hard-newlines)) |
159 (let ((buffer-undo-list t) | 159 (let ((buffer-undo-list t) |