+1998-08-11 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * emu-mule.el (write-region-as-raw-text-CRLF): New function.
+
+ * emu-18.el (generate-new-buffer-name): New function.
+ (Emacs 19 mulating function).
+
1998-08-10 MORIOKA Tomohiko <morioka@jaist.ac.jp>
* emu-nemacs.el, emu-latin1.el (write-region-as-raw-text-CRLF):
)
+;;; @ buffer
+;;;
+
+(defun-maybe generate-new-buffer-name (name &optional ignore)
+ "Return a string that is the name of no existing buffer based on NAME.
+If there is no live buffer named NAME, then return NAME.
+Otherwise modify name by appending `<NUMBER>', incrementing NUMBER
+until an unused name is found, and then return that name.
+Optional second argument IGNORE specifies a name that is okay to use
+\(if it is in the sequence to be tried)
+even if a buffer with that name exists."
+ (if (get-buffer name)
+ (let ((n 2) new)
+ (while (get-buffer (setq new (format "%s<%d>" name n)))
+ (setq n (1+ n)))
+ new)
+ name))
+
+
;;; @ end
;;;
))
)
+(defun write-region-as-raw-text-CRLF (start end filename
+ &optional append visit lockname)
+ "Like `write-region', q.v., but don't code conversion."
+ (let ((the-buf (current-buffer)))
+ (with-temp-buffer
+ (insert-buffer-substring the-buf start end)
+ (goto-char (point-min))
+ (while (re-search-forward "\\(\\=\\|[^\r]\\)\n" nil t)
+ (replace-match "\\1\r\n")
+ )
+ (let ((file-coding-system *noconv*))
+ (write-region (point-min)(point-max) filename append visit)
+ ))))
+
;;; @ MIME charset
;;;