From: Lars Ingebrigtsen Date: Fri, 3 Sep 2021 06:36:03 +0000 (+0200) Subject: Make toggle-truncate-lines disable visual-line-mode X-Git-Tag: emacs-28.0.90~1208 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0d3ae350c91c84b11f7d5fb0913fb7d294bc756f;p=emacs.git Make toggle-truncate-lines disable visual-line-mode * lisp/simple.el (toggle-truncate-lines): Disable `visual-line-mode' (bug#29664). --- diff --git a/lisp/simple.el b/lisp/simple.el index d6c448b36a5..c6495166ffc 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -8306,8 +8306,13 @@ non-nil." (if (eq buffer (window-buffer window)) (set-window-hscroll window 0))) nil t))) - (message "Truncate long lines %s" - (if truncate-lines "enabled" "disabled"))) + (message "Truncate long lines %s%s" + (if truncate-lines "enabled" "disabled") + (if (and truncate-lines visual-line-mode) + (progn + (visual-line-mode -1) + (message " and `visual-line-mode' disabled")) + ""))) (defun toggle-word-wrap (&optional arg) "Toggle whether to use word-wrapping for continuation lines.