aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2008-06-24 17:56:14 +0000
committerChong Yidong2008-06-24 17:56:14 +0000
commit0858cd02f0a115c4ad7e6c5ce92b545e662b7687 (patch)
treeda651be3e8564c8733fe7e1dbe2a4955c6d96262 /src
parentb09987195749473fe0121feac7a72929c76749a4 (diff)
downloademacs-0858cd02f0a115c4ad7e6c5ce92b545e662b7687.tar.gz
emacs-0858cd02f0a115c4ad7e6c5ce92b545e662b7687.zip
(syms_of_buffer): New variables default-word-wrap and word-wrap.
(init_buffer_once): Initialize them.
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 04786dcfa86..4655e05ec63 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5139,6 +5139,7 @@ init_buffer_once ()
5139 5139
5140 XSETFASTINT (buffer_defaults.tab_width, 8); 5140 XSETFASTINT (buffer_defaults.tab_width, 8);
5141 buffer_defaults.truncate_lines = Qnil; 5141 buffer_defaults.truncate_lines = Qnil;
5142 buffer_defaults.word_wrap = Qnil;
5142 buffer_defaults.ctl_arrow = Qt; 5143 buffer_defaults.ctl_arrow = Qt;
5143 buffer_defaults.direction_reversed = Qnil; 5144 buffer_defaults.direction_reversed = Qnil;
5144 buffer_defaults.cursor_type = Qt; 5145 buffer_defaults.cursor_type = Qt;
@@ -5211,6 +5212,7 @@ init_buffer_once ()
5211#endif 5212#endif
5212 XSETFASTINT (buffer_local_flags.tab_width, idx); ++idx; 5213 XSETFASTINT (buffer_local_flags.tab_width, idx); ++idx;
5213 XSETFASTINT (buffer_local_flags.truncate_lines, idx); ++idx; 5214 XSETFASTINT (buffer_local_flags.truncate_lines, idx); ++idx;
5215 XSETFASTINT (buffer_local_flags.word_wrap, idx); ++idx;
5214 XSETFASTINT (buffer_local_flags.ctl_arrow, idx); ++idx; 5216 XSETFASTINT (buffer_local_flags.ctl_arrow, idx); ++idx;
5215 XSETFASTINT (buffer_local_flags.fill_column, idx); ++idx; 5217 XSETFASTINT (buffer_local_flags.fill_column, idx); ++idx;
5216 XSETFASTINT (buffer_local_flags.left_margin, idx); ++idx; 5218 XSETFASTINT (buffer_local_flags.left_margin, idx); ++idx;
@@ -5502,6 +5504,11 @@ This is the same as (default-value 'buffer-file-coding-system). */);
5502 doc: /* Default value of `truncate-lines' for buffers that do not override it. 5504 doc: /* Default value of `truncate-lines' for buffers that do not override it.
5503This is the same as (default-value 'truncate-lines). */); 5505This is the same as (default-value 'truncate-lines). */);
5504 5506
5507 DEFVAR_LISP_NOPRO ("default-word-wrap",
5508 &buffer_defaults.word_wrap,
5509 doc: /* Default value of `word-wrap' for buffers that do not override it.
5510This is the same as (default-value 'word-wrap). */);
5511
5505 DEFVAR_LISP_NOPRO ("default-fill-column", 5512 DEFVAR_LISP_NOPRO ("default-fill-column",
5506 &buffer_defaults.fill_column, 5513 &buffer_defaults.fill_column,
5507 doc: /* Default value of `fill-column' for buffers that do not override it. 5514 doc: /* Default value of `fill-column' for buffers that do not override it.
@@ -5753,6 +5760,15 @@ Note that this is overridden by the variable
5753`truncate-partial-width-windows' if that variable is non-nil 5760`truncate-partial-width-windows' if that variable is non-nil
5754and this buffer is not full-frame width. */); 5761and this buffer is not full-frame width. */);
5755 5762
5763 DEFVAR_PER_BUFFER ("word-wrap", &current_buffer->word_wrap, Qnil,
5764 doc: /* *Non-nil means to use word-wrapping for continuation lines.
5765When word-wrapping is on, continuation lines are wrapped at the space
5766or tab character nearest to the right window edge.
5767If nil, continuation lines are wrapped at the right screen edge.
5768
5769This variable has no effect if long lines are truncated (see
5770`truncate-lines' and `truncate-partial-width-windows'). */);
5771
5756#ifdef DOS_NT 5772#ifdef DOS_NT
5757 DEFVAR_PER_BUFFER ("buffer-file-type", &current_buffer->buffer_file_type, 5773 DEFVAR_PER_BUFFER ("buffer-file-type", &current_buffer->buffer_file_type,
5758 Qnil, 5774 Qnil,