mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-25 15:00:45 -08:00
(get_truename_buffer): New function.
This commit is contained in:
parent
2f2228c0cc
commit
52e011899b
1 changed files with 18 additions and 0 deletions
18
src/buffer.c
18
src/buffer.c
|
|
@ -236,6 +236,24 @@ See also `find-buffer-visiting'.")
|
|||
return Qnil;
|
||||
}
|
||||
|
||||
Lisp_Object
|
||||
get_truename_buffer (filename)
|
||||
register Lisp_Object filename;
|
||||
{
|
||||
register Lisp_Object tail, buf, tem;
|
||||
|
||||
for (tail = Vbuffer_alist; CONSP (tail); tail = XCONS (tail)->cdr)
|
||||
{
|
||||
buf = Fcdr (XCONS (tail)->car);
|
||||
if (!BUFFERP (buf)) continue;
|
||||
if (!STRINGP (XBUFFER (buf)->file_truename)) continue;
|
||||
tem = Fstring_equal (XBUFFER (buf)->file_truename, filename);
|
||||
if (!NILP (tem))
|
||||
return buf;
|
||||
}
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
/* Incremented for each buffer created, to assign the buffer number. */
|
||||
int buffer_count;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue