(insert-file-contents-as-binary): Return value.
[elisp/apel.git] / emu-18.el
index 61cdb99..8ee121a 100644 (file)
--- a/emu-18.el
+++ b/emu-18.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc.
 
 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Id: emu-18.el,v 7.32 1997/03/06 21:04:03 morioka Exp $
+;; Version: $Id: emu-18.el,v 7.33 1997/04/05 06:44:01 morioka Exp $
 ;; Keywords: emulation, compatibility
 
 ;; This file is part of emu.
@@ -276,7 +276,7 @@ With optional non-nil ALL, force redisplay of all mode-lines.
 ;;; @ overlay
 ;;;
 
-(defun tl:overlay-buffer (overlay))
+(defun overlay-buffer (overlay))
 
 
 ;;; @ text property
@@ -358,6 +358,25 @@ With optional non-nil ALL, force redisplay of all mode-lines.
   )
 
 
+;;; @ 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
 ;;;