all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#7596: 23.2.90; fill-flowed with DELETE-SPACE option does not work
@ 2010-12-08 23:48 Kazuhiro Ito
  2011-01-22 19:31 ` Chong Yidong
       [not found] ` <877hdwzqdz.fsf@stupidchicken.com>
  0 siblings, 2 replies; 3+ messages in thread
From: Kazuhiro Ito @ 2010-12-08 23:48 UTC (permalink / raw)
  To: 7596

[-- Attachment #1: Type: text/plain, Size: 366 bytes --]

When I start emacs (emacs-23 branch) with -Q and evaluate below code,
I receive unexpected result.

(with-temp-buffer
  (insert "ABC \nDEF")
  (fill-flowed nil t)
  (buffer-string))

It returns 

"ABC
DEF"

But I expect 

"ABCDEF"


I expect DELETE-SPACE option corresponds to "DelSp" parameter in
RFC3676 and works so.  Plesse see attached patch.

-- 
Kazuhiro Ito

[-- Attachment #2: flow-fill.el.diff --]
[-- Type: application/octet-stream, Size: 654 bytes --]

=== modified file 'lisp/gnus/flow-fill.el'
--- lisp/gnus/flow-fill.el	2010-01-13 08:35:10 +0000
+++ lisp/gnus/flow-fill.el	2010-12-08 10:14:13 +0000
@@ -106,8 +106,6 @@
       (forward-line 1))
     (goto-char (point-min))
     (while (re-search-forward " $" nil t)
-      (when delete-space
-	(delete-char -1))
       (when (save-excursion
 	      (beginning-of-line)
 	      (looking-at "^\\(>*\\)\\( ?\\)"))
@@ -135,6 +133,8 @@
 	      (replace-match (if (string= (match-string 2) " ")
 				 "" "\\2")))
 	    (backward-delete-char -1)
+	    (when delete-space
+	      (delete-char -1))
 	    (end-of-line))
 	  (unless sig
 	    (condition-case nil


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-22 19:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-08 23:48 bug#7596: 23.2.90; fill-flowed with DELETE-SPACE option does not work Kazuhiro Ito
2011-01-22 19:31 ` Chong Yidong
     [not found] ` <877hdwzqdz.fsf@stupidchicken.com>
2011-01-22 19:48   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.