Mercurial > emacs
comparison src/buffer.c @ 10751:dea8f022819d
(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.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 14 Feb 1995 16:33:19 +0000 |
parents | acbd9fab366a |
children | 3aea65d9eb68 |
comparison
equal
deleted
inserted
replaced
10750:7bf07f10bed3 | 10751:dea8f022819d |
---|---|
408 void | 408 void |
409 reset_buffer (b) | 409 reset_buffer (b) |
410 register struct buffer *b; | 410 register struct buffer *b; |
411 { | 411 { |
412 b->filename = Qnil; | 412 b->filename = Qnil; |
413 b->file_truename = Qnil; | |
413 b->directory = (current_buffer) ? current_buffer->directory : Qnil; | 414 b->directory = (current_buffer) ? current_buffer->directory : Qnil; |
414 b->modtime = 0; | 415 b->modtime = 0; |
415 XSETFASTINT (b->save_length, 0); | 416 XSETFASTINT (b->save_length, 0); |
416 b->last_window_start = 1; | 417 b->last_window_start = 1; |
417 b->backed_up = Qnil; | 418 b->backed_up = Qnil; |
2692 buffer_defaults.buffer_file_type = Qnil; /* TEXT */ | 2693 buffer_defaults.buffer_file_type = Qnil; /* TEXT */ |
2693 #endif | 2694 #endif |
2694 XSETFASTINT (buffer_defaults.fill_column, 70); | 2695 XSETFASTINT (buffer_defaults.fill_column, 70); |
2695 XSETFASTINT (buffer_defaults.left_margin, 0); | 2696 XSETFASTINT (buffer_defaults.left_margin, 0); |
2696 buffer_defaults.cache_long_line_scans = Qnil; | 2697 buffer_defaults.cache_long_line_scans = Qnil; |
2698 buffer_defaults.file_truename = Qnil; | |
2697 | 2699 |
2698 /* Assign the local-flags to the slots that have default values. | 2700 /* Assign the local-flags to the slots that have default values. |
2699 The local flag is a bit that is used in the buffer | 2701 The local flag is a bit that is used in the buffer |
2700 to say that it has its own local value for the slot. | 2702 to say that it has its own local value for the slot. |
2701 The local flag bits are in the local_var_flags slot of the buffer. */ | 2703 The local flag bits are in the local_var_flags slot of the buffer. */ |
2714 XSETINT (buffer_local_flags.major_mode, -1); | 2716 XSETINT (buffer_local_flags.major_mode, -1); |
2715 XSETINT (buffer_local_flags.mode_name, -1); | 2717 XSETINT (buffer_local_flags.mode_name, -1); |
2716 XSETINT (buffer_local_flags.undo_list, -1); | 2718 XSETINT (buffer_local_flags.undo_list, -1); |
2717 XSETINT (buffer_local_flags.mark_active, -1); | 2719 XSETINT (buffer_local_flags.mark_active, -1); |
2718 XSETINT (buffer_local_flags.point_before_scroll, -1); | 2720 XSETINT (buffer_local_flags.point_before_scroll, -1); |
2721 XSETINT (buffer_local_flags.file_truename, -1); | |
2719 | 2722 |
2720 XSETFASTINT (buffer_local_flags.mode_line_format, 1); | 2723 XSETFASTINT (buffer_local_flags.mode_line_format, 1); |
2721 XSETFASTINT (buffer_local_flags.abbrev_mode, 2); | 2724 XSETFASTINT (buffer_local_flags.abbrev_mode, 2); |
2722 XSETFASTINT (buffer_local_flags.overwrite_mode, 4); | 2725 XSETFASTINT (buffer_local_flags.overwrite_mode, 4); |
2723 XSETFASTINT (buffer_local_flags.case_fold_search, 8); | 2726 XSETFASTINT (buffer_local_flags.case_fold_search, 8); |
3006 DEFVAR_PER_BUFFER ("buffer-file-name", ¤t_buffer->filename, | 3009 DEFVAR_PER_BUFFER ("buffer-file-name", ¤t_buffer->filename, |
3007 make_number (Lisp_String), | 3010 make_number (Lisp_String), |
3008 "Name of file visited in current buffer, or nil if not visiting a file.\n\ | 3011 "Name of file visited in current buffer, or nil if not visiting a file.\n\ |
3009 Each buffer has its own value of this variable."); | 3012 Each buffer has its own value of this variable."); |
3010 | 3013 |
3014 DEFVAR_PER_BUFFER ("buffer-file-truename", ¤t_buffer->file_truename, | |
3015 make_number (Lisp_String), | |
3016 "Truename of file visited in current buffer, or nil if not visiting a file.\n\ | |
3017 The truename of a file is calculated by `file-truename'.\n\ | |
3018 Each buffer has its own value of this variable."); | |
3019 | |
3011 DEFVAR_PER_BUFFER ("buffer-auto-save-file-name", | 3020 DEFVAR_PER_BUFFER ("buffer-auto-save-file-name", |
3012 ¤t_buffer->auto_save_file_name, | 3021 ¤t_buffer->auto_save_file_name, |
3013 make_number (Lisp_String), | 3022 make_number (Lisp_String), |
3014 "Name of file for auto-saving current buffer,\n\ | 3023 "Name of file for auto-saving current buffer,\n\ |
3015 or nil if buffer should not be auto-saved.\n\ | 3024 or nil if buffer should not be auto-saved.\n\ |