]> git.eshelyaron.com Git - emacs.git/commitdiff
Make truncate-lines permanently local (bug#15396)
authorGlenn Morris <rgm@gnu.org>
Thu, 30 Nov 2017 17:40:46 +0000 (12:40 -0500)
committerGlenn Morris <rgm@gnu.org>
Thu, 30 Nov 2017 17:40:46 +0000 (12:40 -0500)
Width of lines relative to display is rarely a function of major mode.
* src/buffer.c (init_buffer_once) <truncate-lines>:
Flag as permanently local.
* lisp/bindings.el (truncate-lines): Add permanent-local property.

lisp/bindings.el
src/buffer.c

index 2b664044de8d5ead6af505096141c50eb3898d03..2bad90351c458d4974ddc995dde0d54871358d90 100644 (file)
@@ -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)
index c6f9eb28e257c9c37e5559bb53b4bc878fece132..12a467daae477dd8fba4ded9fa393c5a29153357 100644 (file)
@@ -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;