summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-08-09 22:39:09 +0000
committerRichard M. Stallman <rms@gnu.org>1995-08-09 22:39:09 +0000
commit52e011899b22dec7f650d34a1145cf06f4e403bd (patch)
treee96c16287521927f6d0c63413a8bfdc283ce9244 /src/buffer.c
parent2f2228c0cc00793de8dc0fb2d08447950165c0a9 (diff)
(get_truename_buffer): New function.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c18
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'.")
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;