X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fdeuglify.el;h=60f8c95bb2ebd355e3fcdb9abbda87f850b346a9;hb=3595cdc6d72437c3b6c6d351be5cdd5f6d369dca;hp=8eb75ce63b00fab67597fe0b7ab325a01b54218b;hpb=535e7b93ab91af79142fba699cf1d640136eaf56;p=gnus diff --git a/lisp/deuglify.el b/lisp/deuglify.el index 8eb75ce63..60f8c95bb 100644 --- a/lisp/deuglify.el +++ b/lisp/deuglify.el @@ -1,29 +1,27 @@ ;;; deuglify.el --- deuglify broken Outlook (Express) articles -;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -;; Copyright (C) 2001, 2002 Raymond Scholz +;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Free Software Foundation, Inc. ;; Author: Raymond Scholz -;; Thomas Steffen (unwrapping algorithm, -;; based on an idea of Stefan Monnier) +;; Thomas Steffen +;; (unwrapping algorithm, based on an idea of Stefan Monnier) ;; Keywords: mail, news ;; This file is part of GNU Emacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -68,7 +66,7 @@ ;; > verb. This sentence no verb. This sentence no verb. This ;; > sentence no verb. ;; -;; Unwrapping "You forgot in all your sentences." would be illegal as +;; Unwrapping "You forgot in all your sentences." would be invalid as ;; this part wasn't intended to be cited text. ;; `gnus-article-outlook-unwrap-lines' will only unwrap lines if the resulting ;; citation line will be of a certain maximum length. You can control @@ -338,6 +336,7 @@ NODISPLAY is non-nil, don't redisplay the article buffer." (defun gnus-outlook-rearrange-article (attr-start) "Put the text from ATTR-START to the end of buffer at the top of the article buffer." + ;; FIXME: 1. (*) text/plain ( ) text/html (let ((inhibit-read-only t) (cite-marks gnus-outlook-deuglify-cite-marks)) (gnus-with-article-buffer @@ -352,8 +351,18 @@ NODISPLAY is non-nil, don't redisplay the article buffer." (point-max)))) ;; handle the case where the full quote is below the ;; signature - (if (< to attr-start) + (when (< to attr-start) + (setq to (point-max))) + (save-excursion + (narrow-to-region attr-start to) + (goto-char attr-start) + (forward-line) + (unless (looking-at ">") + (message-indent-citation (point) (point-max) 'yank-only) + (goto-char (point-max)) + (newline) (setq to (point-max))) + (widen)) (transpose-regions cur attr-start attr-start to)))))) ;; John Doe wrote in message @@ -467,5 +476,4 @@ NODISPLAY is non-nil, don't redisplay the article buffer." ;; coding: iso-8859-1 ;; End: -;;; arch-tag: 5f895cc9-51a9-487c-b42e-28844d79eb73 ;;; deuglify.el ends here