diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/buffer.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c index f0bd7013e50..db1e3110dd0 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -236,6 +236,24 @@ See also `find-buffer-visiting'.") | |||
| 236 | return Qnil; | 236 | return Qnil; |
| 237 | } | 237 | } |
| 238 | 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); | ||
| 251 | if (!NILP (tem)) | ||
| 252 | return buf; | ||
| 253 | } | ||
| 254 | return Qnil; | ||
| 255 | } | ||
| 256 | |||
| 239 | /* Incremented for each buffer created, to assign the buffer number. */ | 257 | /* Incremented for each buffer created, to assign the buffer number. */ |
| 240 | int buffer_count; | 258 | int buffer_count; |
| 241 | 259 | ||