From 3f3d98ee5851840228786390ee7dbf851d144eb8 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 30 Nov 2017 12:40:46 -0500 Subject: [PATCH] Make truncate-lines permanently local (bug#15396) Width of lines relative to display is rarely a function of major mode. * src/buffer.c (init_buffer_once) : Flag as permanently local. * lisp/bindings.el (truncate-lines): Add permanent-local property. --- lisp/bindings.el | 2 +- src/buffer.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/bindings.el b/lisp/bindings.el index 2b664044de8..2bad90351c4 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -699,7 +699,7 @@ okay. See `mode-line-format'.") buffer-file-format buffer-auto-save-file-format buffer-display-count buffer-display-time enable-multibyte-characters - buffer-file-coding-system)) + buffer-file-coding-system truncate-lines)) ;; We have base64, md5 and sha1 functions built in now. (provide 'base64) diff --git a/src/buffer.c b/src/buffer.c index c6f9eb28e25..12a467daae4 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5134,7 +5134,9 @@ init_buffer_once (void) XSETFASTINT (BVAR (&buffer_local_flags, selective_display), idx); ++idx; XSETFASTINT (BVAR (&buffer_local_flags, selective_display_ellipses), idx); ++idx; XSETFASTINT (BVAR (&buffer_local_flags, tab_width), idx); ++idx; - XSETFASTINT (BVAR (&buffer_local_flags, truncate_lines), idx); ++idx; + XSETFASTINT (BVAR (&buffer_local_flags, truncate_lines), idx); + /* Make this one a permanent local. */ + buffer_permanent_local_flags[idx++] = 1; XSETFASTINT (BVAR (&buffer_local_flags, word_wrap), idx); ++idx; XSETFASTINT (BVAR (&buffer_local_flags, ctl_arrow), idx); ++idx; XSETFASTINT (BVAR (&buffer_local_flags, fill_column), idx); ++idx; -- 2.39.5