summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-02-14 16:33:19 +0000
committerRichard M. Stallman <rms@gnu.org>1995-02-14 16:33:19 +0000
commitf6ed2e848d23035748b621a86be74956c093823f (patch)
tree8b63b904eaa4bb419e33ee3a65cc5ebb9b886d2a /src/buffer.c
parent8eb34fb9f541e8e8faabdd4206fd47f10b633eb1 (diff)
downloademacs-f6ed2e848d23035748b621a86be74956c093823f.tar.gz
(syms_of_buffer): Set up Lisp var buffer-file-truename.
(init_buffer_once): Set up flag and default value for file_truename. (reset_buffer): Init file_truename slot.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 334d71931a0..1ceec958a00 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -410,6 +410,7 @@ reset_buffer (b)
register struct buffer *b;
{
b->filename = Qnil;
+ b->file_truename = Qnil;
b->directory = (current_buffer) ? current_buffer->directory : Qnil;
b->modtime = 0;
XSETFASTINT (b->save_length, 0);
@@ -2694,6 +2695,7 @@ init_buffer_once ()
XSETFASTINT (buffer_defaults.fill_column, 70);
XSETFASTINT (buffer_defaults.left_margin, 0);
buffer_defaults.cache_long_line_scans = Qnil;
+ buffer_defaults.file_truename = Qnil;
/* Assign the local-flags to the slots that have default values.
The local flag is a bit that is used in the buffer
@@ -2716,6 +2718,7 @@ init_buffer_once ()
XSETINT (buffer_local_flags.undo_list, -1);
XSETINT (buffer_local_flags.mark_active, -1);
XSETINT (buffer_local_flags.point_before_scroll, -1);
+ XSETINT (buffer_local_flags.file_truename, -1);
XSETFASTINT (buffer_local_flags.mode_line_format, 1);
XSETFASTINT (buffer_local_flags.abbrev_mode, 2);
@@ -3008,6 +3011,12 @@ It may not be a list of functions.");
"Name of file visited in current buffer, or nil if not visiting a file.\n\
Each buffer has its own value of this variable.");
+ DEFVAR_PER_BUFFER ("buffer-file-truename", &current_buffer->file_truename,
+ make_number (Lisp_String),
+ "Truename of file visited in current buffer, or nil if not visiting a file.\n\
+The truename of a file is calculated by `file-truename'.\n\
+Each buffer has its own value of this variable.");
+
DEFVAR_PER_BUFFER ("buffer-auto-save-file-name",
&current_buffer->auto_save_file_name,
make_number (Lisp_String),