/[emacs]/emacs/lisp/longlines.el
ViewVC logotype

Diff of /emacs/lisp/longlines.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by cyd, Sat Nov 19 18:31:08 2005 UTC revision 1.19 by cyd, Sun Nov 20 03:44:00 2005 UTC
# Line 127  are indicated with a symbol." Line 127  are indicated with a symbol."
127            ;; longlines-wrap-lines that we'll never encounter from here            ;; longlines-wrap-lines that we'll never encounter from here
128            (save-restriction            (save-restriction
129              (widen)              (widen)
130              (longlines-decode-region (point-min) (point-max)))              (longlines-decode-buffer))
131            (longlines-wrap-region (point-min) (point-max))            (longlines-wrap-region (point-min) (point-max))
132            (set-buffer-modified-p mod))            (set-buffer-modified-p mod))
133          (when (and longlines-show-hard-newlines          (when (and longlines-show-hard-newlines
# Line 140  are indicated with a symbol." Line 140  are indicated with a symbol."
140                     (add-hook 'mail-citation-hook 'mail-indent-citation nil t))                     (add-hook 'mail-citation-hook 'mail-indent-citation nil t))
141                 (add-hook 'mail-citation-hook 'longlines-decode-region nil t))                 (add-hook 'mail-citation-hook 'longlines-decode-region nil t))
142                ((eq major-mode 'message-mode)                ((eq major-mode 'message-mode)
143                   (add-hook 'message-setup-hook 'longlines-decode-buffer nil t)
144                 (make-local-variable 'message-indent-citation-function)                 (make-local-variable 'message-indent-citation-function)
145                 (if (not (listp message-indent-citation-function))                 (if (not (listp message-indent-citation-function))
146                     (setq message-indent-citation-function                     (setq message-indent-citation-function
# Line 325  If BEG and END are nil, the point and ma Line 326  If BEG and END are nil, the point and ma
326        (set-hard-newline-properties        (set-hard-newline-properties
327         (match-beginning 0) (match-end 0)))))         (match-beginning 0) (match-end 0)))))
328    
329    (defun longlines-decode-buffer ()
330      "Turn all newlines in the buffer into hard newlines."
331      (longlines-decode-region (point-min) (point-max)))
332    
333  (defun longlines-encode-region (beg end &optional buffer)  (defun longlines-encode-region (beg end &optional buffer)
334    "Replace each soft newline between BEG and END with exactly one space.    "Replace each soft newline between BEG and END with exactly one space.
335  Hard newlines are left intact.  The optional argument BUFFER exists for  Hard newlines are left intact.  The optional argument BUFFER exists for

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26