diff options
| author | Richard M. Stallman | 1995-08-09 22:39:09 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-08-09 22:39:09 +0000 |
| commit | 52e011899b22dec7f650d34a1145cf06f4e403bd (patch) | |
| tree | e96c16287521927f6d0c63413a8bfdc283ce9244 /src/buffer.c | |
| parent | 2f2228c0cc00793de8dc0fb2d08447950165c0a9 (diff) | |
| download | emacs-52e011899b22dec7f650d34a1145cf06f4e403bd.tar.gz emacs-52e011899b22dec7f650d34a1145cf06f4e403bd.zip | |
(get_truename_buffer): New function.
Diffstat (limited to 'src/buffer.c')
| -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 | ||