Mercurial > emacs
comparison src/buffer.c @ 12810:bd486675e103
(get_truename_buffer): New function.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Wed, 09 Aug 1995 22:39:09 +0000 |
| parents | 937df231678c |
| children | 404ae27d5148 |
comparison
equal
deleted
inserted
replaced
| 12809:c388f6f7f210 | 12810:bd486675e103 |
|---|---|
| 228 { | 228 { |
| 229 buf = Fcdr (XCONS (tail)->car); | 229 buf = Fcdr (XCONS (tail)->car); |
| 230 if (!BUFFERP (buf)) continue; | 230 if (!BUFFERP (buf)) continue; |
| 231 if (!STRINGP (XBUFFER (buf)->filename)) continue; | 231 if (!STRINGP (XBUFFER (buf)->filename)) continue; |
| 232 tem = Fstring_equal (XBUFFER (buf)->filename, filename); | 232 tem = Fstring_equal (XBUFFER (buf)->filename, filename); |
| 233 if (!NILP (tem)) | |
| 234 return buf; | |
| 235 } | |
| 236 return Qnil; | |
| 237 } | |
| 238 | |
| 239 Lisp_Object | |
| 240 get_truename_buffer (filename) | |
| 241 register Lisp_Object filename; | |
| 242 { | |
| 243 register Lisp_Object tail, buf, tem; | |
| 244 | |
| 245 for (tail = Vbuffer_alist; CONSP (tail); tail = XCONS (tail)->cdr) | |
| 246 { | |
| 247 buf = Fcdr (XCONS (tail)->car); | |
| 248 if (!BUFFERP (buf)) continue; | |
| 249 if (!STRINGP (XBUFFER (buf)->file_truename)) continue; | |
| 250 tem = Fstring_equal (XBUFFER (buf)->file_truename, filename); | |
| 233 if (!NILP (tem)) | 251 if (!NILP (tem)) |
| 234 return buf; | 252 return buf; |
| 235 } | 253 } |
| 236 return Qnil; | 254 return Qnil; |
| 237 } | 255 } |
