[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: change soft to hard lines and back
From: |
Uwe Brauer |
Subject: |
Re: change soft to hard lines and back |
Date: |
Thu, 14 Dec 2017 16:18:04 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
"Hinrik" == Hinrik Örn Sigurðsson <address@hidden>
writes:
> You can use the function set-hard-newline-properties to mark
> all newlines in some range as hard. For the inverse you can
> remove the 'hard property with (remove-text-property START
> END '(hard nil)).
Thanks but that function must be very new. For GNU emacs 26 I
obtain
Debugger entered--Lisp error: (void-function remove-text-property)
remove-text-property(83 84 hard t) soften-newlines()
funcall-interactively(soften-newlines)
call-interactively(soften-newlines record nil)
command-execute(soften-newlines record)
execute-extended-command(nil "soften-newlines" "soft")
funcall-interactively(execute-extended-command nil
"soften-newlines" "soft")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
So I tried remove-text-properties
(defun soften-newlines () (interactive)
(save-excursion
; (goto-char (point-min))
(mail-text) (while (search-forward "\n" nil t)
(remove-text-properties (1- (point)) (point) 'hard nil))))
But it did not work, the hardlines were not removed.
Re: change soft to hard lines and back, Jorge A. Alfaro-Murillo, 2017/12/14