summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
authorAlan Pearce2017-09-22 12:51:03 +0200
committerAlan Pearce2017-09-22 12:51:03 +0200
commit3da76fef7e1910faa8e3fd21f2e5697c735f80af (patch)
tree604a7d0ca0056c8a1bb343ea33781ff8b39e6304 /emacs
parenta6d1c9cdbb9b66011d1a87bf1ea688b5014ce2b9 (diff)
downloadnixfiles-3da76fef7e1910faa8e3fd21f2e5697c735f80af.tar.lz
nixfiles-3da76fef7e1910faa8e3fd21f2e5697c735f80af.tar.zst
nixfiles-3da76fef7e1910faa8e3fd21f2e5697c735f80af.zip
Emacs: Only wrap lines in non-prog modes
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/main.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index 2adc39da..7e784362 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -1936,6 +1936,11 @@ With prefix TO-CURRENT-BUFFER, insert command output into buffer."
 
 
 ;;;;; Programming
+
+(define-hook-helper prog-mode ()
+  :name long-lines
+  (setq-local truncate-lines t))
+
 ;;;;;; flycheck
 
 ;; On-the-fly error checking in programming modes?  Yes please.
@@ -2637,7 +2642,7 @@ Pass ARG to `comint-delchar-or-maybe-eof'."
 (put 'downcase-region 'disabled nil)
 (setq sentence-end-double-space t
       line-move-visual nil)
-(setq-default truncate-lines t)
+(setq-default truncate-lines nil)
 ;; #+END_SRC
 
 ;;;;;; align