Mercurial > emacs
comparison src/buffer.c @ 6697:28e36f59e856
(Fget_buffer_create): Disallow empty string.
| author | Karl Heuer <kwzh@gnu.org> |
|---|---|
| date | Wed, 06 Apr 1994 04:06:13 +0000 |
| parents | cf38c5af079d |
| children | 121f2c5eba5e |
comparison
equal
deleted
inserted
replaced
| 6696:097fa44199ab | 6697:28e36f59e856 |
|---|---|
| 227 register struct buffer *b; | 227 register struct buffer *b; |
| 228 | 228 |
| 229 buf = Fget_buffer (name); | 229 buf = Fget_buffer (name); |
| 230 if (!NILP (buf)) | 230 if (!NILP (buf)) |
| 231 return buf; | 231 return buf; |
| 232 | |
| 233 if (XSTRING (name)->size == 0) | |
| 234 error ("Empty string for buffer name is not allowed"); | |
| 232 | 235 |
| 233 b = (struct buffer *) xmalloc (sizeof (struct buffer)); | 236 b = (struct buffer *) xmalloc (sizeof (struct buffer)); |
| 234 | 237 |
| 235 BUF_GAP_SIZE (b) = 20; | 238 BUF_GAP_SIZE (b) = 20; |
| 236 BLOCK_INPUT; | 239 BLOCK_INPUT; |
