# HG changeset patch # User Richard M. Stallman # Date 1035672031 0 # Node ID d3416b0f856c30fe5ac3f30fd21795761a1f2c09 # Parent 73c9cc6e85380fcb983beb6219a05f5734cbb0e6 (toggle-truncate-lines): When turning off truncation, clear out the hscroll value in this buffer's windows. (display-message-or-buffer): Don't display empty output in the echo area. diff -r 73c9cc6e8538 -r d3416b0f856c lisp/simple.el --- a/lisp/simple.el Sat Oct 26 22:37:54 2002 +0000 +++ b/lisp/simple.el Sat Oct 26 22:40:31 2002 +0000 @@ -1343,7 +1343,8 @@ (if (= (buffer-size) 0) 0 (count-lines (point-min) (point-max))))) - (cond ((and (or (<= lines 1) + (cond ((= lines 0)) + ((and (or (<= lines 1) (<= lines (if resize-mini-windows (cond ((floatp max-mini-window-height) @@ -3234,6 +3235,12 @@ (not truncate-lines) (> (prefix-numeric-value arg) 0))) (force-mode-line-update) + (unless truncate-lines + (let ((buffer (current-buffer))) + (walk-windows (lambda (window) + (if (eq buffer (window-buffer window)) + (set-window-hscroll window 0))) + nil t))) (message "Truncate long lines %s" (if truncate-lines "enabled" "disabled")))