emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/longlines.el


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/longlines.el
Date: Sat, 19 Nov 2005 22:44:01 -0500

Index: emacs/lisp/longlines.el
diff -c emacs/lisp/longlines.el:1.18 emacs/lisp/longlines.el:1.19
*** emacs/lisp/longlines.el:1.18        Sat Nov 19 18:31:08 2005
--- emacs/lisp/longlines.el     Sun Nov 20 03:44:00 2005
***************
*** 127,133 ****
            ;; longlines-wrap-lines that we'll never encounter from here
          (save-restriction
            (widen)
!           (longlines-decode-region (point-min) (point-max)))
            (longlines-wrap-region (point-min) (point-max))
            (set-buffer-modified-p mod))
          (when (and longlines-show-hard-newlines
--- 127,133 ----
            ;; longlines-wrap-lines that we'll never encounter from here
          (save-restriction
            (widen)
!           (longlines-decode-buffer))
            (longlines-wrap-region (point-min) (point-max))
            (set-buffer-modified-p mod))
          (when (and longlines-show-hard-newlines
***************
*** 140,145 ****
--- 140,146 ----
                   (add-hook 'mail-citation-hook 'mail-indent-citation nil t))
               (add-hook 'mail-citation-hook 'longlines-decode-region nil t))
              ((eq major-mode 'message-mode)
+              (add-hook 'message-setup-hook 'longlines-decode-buffer nil t)
               (make-local-variable 'message-indent-citation-function)
               (if (not (listp message-indent-citation-function))
                   (setq message-indent-citation-function
***************
*** 324,329 ****
--- 325,334 ----
      (while (search-forward "\n" (max beg end) t)
        (set-hard-newline-properties
         (match-beginning 0) (match-end 0)))))
+ 
+ (defun longlines-decode-buffer ()
+   "Turn all newlines in the buffer into hard newlines."
+   (longlines-decode-region (point-min) (point-max)))
  
  (defun longlines-encode-region (beg end &optional buffer)
    "Replace each soft newline between BEG and END with exactly one space.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]