aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Verona2012-11-30 08:05:33 +0100
committerJoakim Verona2012-11-30 08:05:33 +0100
commitec0f852f355712b217378b99fa21e4de57f797f3 (patch)
tree0822d4faac85784430d52ce4a1662bb83ce66eec
parentceed1ad723da9b5db2fd7ece0f686f7deb4432f5 (diff)
parentccf520bb268aa7ca6583706ae18bb90df9f2f139 (diff)
downloademacs-ec0f852f355712b217378b99fa21e4de57f797f3.tar.gz
emacs-ec0f852f355712b217378b99fa21e4de57f797f3.zip
auto upstream
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/longlines.el10
2 files changed, 12 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6c96213a71f..e0b140bc276 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-11-30 Chong Yidong <cyd@gnu.org>
2
3 * longlines.el (longlines-wrap-line, longlines-encode-region):
4 Preserve text properties (Bug#1425).
5
12012-11-30 OKAZAKI Tetsurou <okazaki.tetsurou@gmail.com> (tiny change) 62012-11-30 OKAZAKI Tetsurou <okazaki.tetsurou@gmail.com> (tiny change)
2 7
3 * vc/vc.el (vc-register): Allow registering a file which is 8 * vc/vc.el (vc-register): Allow registering a file which is
diff --git a/lisp/longlines.el b/lisp/longlines.el
index 68722a8f920..d249eaa6583 100644
--- a/lisp/longlines.el
+++ b/lisp/longlines.el
@@ -278,7 +278,7 @@ end of the buffer."
278If wrapping is performed, point remains on the line. If the line does 278If wrapping is performed, point remains on the line. If the line does
279not need to be wrapped, move point to the next line and return t." 279not need to be wrapped, move point to the next line and return t."
280 (if (longlines-set-breakpoint) 280 (if (longlines-set-breakpoint)
281 (progn (insert-before-markers ?\n) 281 (progn (insert-before-markers-and-inherit ?\n)
282 (backward-char 1) 282 (backward-char 1)
283 (delete-char -1) 283 (delete-char -1)
284 (forward-char 1) 284 (forward-char 1)
@@ -384,8 +384,12 @@ compatibility with `format-alist', and is ignored."
384 (mod (buffer-modified-p))) 384 (mod (buffer-modified-p)))
385 (goto-char (min beg end)) 385 (goto-char (min beg end))
386 (while (search-forward "\n" reg-max t) 386 (while (search-forward "\n" reg-max t)
387 (unless (get-text-property (match-beginning 0) 'hard) 387 (let ((pos (match-beginning 0)))
388 (replace-match " "))) 388 (unless (get-text-property pos 'hard)
389 (goto-char (1+ pos))
390 (insert-and-inherit " ")
391 (delete-region pos (1+ pos))
392 (remove-text-properties pos (1+ pos) 'hard))))
389 (set-buffer-modified-p mod) 393 (set-buffer-modified-p mod)
390 end))) 394 end)))
391 395