aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2002-10-26 22:40:31 +0000
committerRichard M. Stallman2002-10-26 22:40:31 +0000
commit4f01718584e0f704ee6129547f700af3f56efa7d (patch)
treef190ec4720a3e22c012bdb0cf929436e9e369e0b
parent146afb5f31f4caaca64629909f8b79f490e6aa57 (diff)
downloademacs-4f01718584e0f704ee6129547f700af3f56efa7d.tar.gz
emacs-4f01718584e0f704ee6129547f700af3f56efa7d.zip
(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.
-rw-r--r--lisp/simple.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index ecf0e95a620..47f43dea1c3 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1343,7 +1343,8 @@ and only used if a buffer is displayed."
1343 (if (= (buffer-size) 0) 1343 (if (= (buffer-size) 0)
1344 0 1344 0
1345 (count-lines (point-min) (point-max))))) 1345 (count-lines (point-min) (point-max)))))
1346 (cond ((and (or (<= lines 1) 1346 (cond ((= lines 0))
1347 ((and (or (<= lines 1)
1347 (<= lines 1348 (<= lines
1348 (if resize-mini-windows 1349 (if resize-mini-windows
1349 (cond ((floatp max-mini-window-height) 1350 (cond ((floatp max-mini-window-height)
@@ -3234,6 +3235,12 @@ Note that in side-by-side windows, truncation is always enabled."
3234 (not truncate-lines) 3235 (not truncate-lines)
3235 (> (prefix-numeric-value arg) 0))) 3236 (> (prefix-numeric-value arg) 0)))
3236 (force-mode-line-update) 3237 (force-mode-line-update)
3238 (unless truncate-lines
3239 (let ((buffer (current-buffer)))
3240 (walk-windows (lambda (window)
3241 (if (eq buffer (window-buffer window))
3242 (set-window-hscroll window 0)))
3243 nil t)))
3237 (message "Truncate long lines %s" 3244 (message "Truncate long lines %s"
3238 (if truncate-lines "enabled" "disabled"))) 3245 (if truncate-lines "enabled" "disabled")))
3239 3246