[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Luc Teirlinck
Subject: use-hard-newlines
Date: Thu, 2 Sep 2004 20:22:50 -0500 (CDT)

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]