diff lisp/simple.el @ 215:1f0dabaa0855 r20-4b6

Import from CVS: tag r20-4b6
author cvs
date Mon, 13 Aug 2007 10:07:35 +0200
parents 41ff10fd062f
children 262b8bb4a523
line wrap: on
line diff
--- a/lisp/simple.el	Mon Aug 13 10:06:48 2007 +0200
+++ b/lisp/simple.el	Mon Aug 13 10:07:35 2007 +0200
@@ -163,6 +163,14 @@
 	(move-to-left-margin nil t)))
   nil)
 
+(defun set-hard-newline-properties (from to)
+  (let ((sticky (get-text-property from 'rear-nonsticky)))
+    (put-text-property from to 'hard 't)
+    ;; If rear-nonsticky is not "t", add 'hard to rear-nonsticky list
+    (if (and (listp sticky) (not (memq 'hard sticky)))
+	(put-text-property from (point) 'rear-nonsticky
+			   (cons 'hard sticky)))))
+
 (defun open-line (arg)
   "Insert a newline and leave point before it.
 If there is a fill prefix and/or a left-margin, insert them on the new line
@@ -3478,7 +3486,7 @@
 (defun show-message-log ()
   "Show the \" *Message-Log*\" buffer, which contains old messages and errors."
   (interactive)
-  (pop-to-buffer " *Message-Log*"))
+  (pop-to-buffer (get-buffer-create " *Message-Log*")))
 
 (defvar log-message-filter-function 'log-message-filter
   "Value must be a function of two arguments: a symbol (label) and