From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: use-hard-newlines Date: Thu, 2 Sep 2004 20:22:50 -0500 (CDT) Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <200409030122.i831MoC06776@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1094174616 14847 80.91.224.253 (3 Sep 2004 01:23:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 3 Sep 2004 01:23:36 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 03 03:23:27 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C32nW-0002y7-00 for ; Fri, 03 Sep 2004 03:23:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C32sW-0006fA-KG for ged-emacs-devel@m.gmane.org; Thu, 02 Sep 2004 21:28:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C32sP-0006eu-GS for emacs-devel@gnu.org; Thu, 02 Sep 2004 21:28:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C32sK-0006dy-OT for emacs-devel@gnu.org; Thu, 02 Sep 2004 21:28:29 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C32sK-0006dv-M4 for emacs-devel@gnu.org; Thu, 02 Sep 2004 21:28:24 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C32n4-0007q6-3W for emacs-devel@gnu.org; Thu, 02 Sep 2004 21:22:58 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id i831MpuE023372 for ; Thu, 2 Sep 2004 20:22:51 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id i831MoC06776; Thu, 2 Sep 2004 20:22:50 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:26744 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26744 When visiting a file that Emacs earlier saved in text/enriched format, Enriched mode is turned on, but hard newlines do not work. The reason is that visiting the file sets the major mode _after_ enriched-mode is called and has set the non-permanent local variable `use-hard-newlines' to t. That is futile, because `kill-all-local-variables' kills it. Since the variable `enriched-mode' is a permanent local, would it not be consistent to make the closely related `use-hard-newlines' permanent local too? The trivial patch below does that. This solves the problem described above. I could install the patch if there are no objections. ===File ~/paragraphs-diff=================================== *** paragraphs.el 13 Jun 2004 17:08:05 -0500 1.72 --- paragraphs.el 02 Sep 2004 19:37:08 -0500 *************** *** 34,39 **** --- 34,40 ---- "Paragraph and sentence parsing." :group 'editing) + (put 'use-hard-newlines 'permanent-local t) (define-minor-mode use-hard-newlines "Minor mode to distinguish hard and soft newlines. When active, the functions `newline' and `open-line' add the ============================================================