* descr-text.el (describe-char): Don't insert extra newlines.

Fixes: debbugs:10127
This commit is contained in:
Chong Yidong 2012-08-09 16:10:32 +08:00
parent c7fe9adcd4
commit 3e861c8a0d
2 changed files with 8 additions and 11 deletions

View file

@ -1,5 +1,8 @@
2012-08-09 Chong Yidong <cyd@gnu.org>
* descr-text.el (describe-char): Don't insert extra newlines
(Bug#10127).
* vc/log-view.el (log-view-diff): Use use-region-p (Bug#10133).
(log-view-diff-changeset, log-view-minor-wrap): Likewise.

View file

@ -679,17 +679,11 @@ relevant to POS."
(when (cadr elt)
(insert (format formatter (car elt)))
(dolist (clm (cdr elt))
(if (eq (car-safe clm) 'insert-text-button)
(progn (insert " ") (eval clm))
(when (>= (+ (current-column)
(or (string-match-p "\n" clm)
(string-width clm))
1)
(window-width))
(insert "\n")
(indent-to (1+ max-width)))
(unless (zerop (length clm))
(insert " " clm))))
(cond ((eq (car-safe clm) 'insert-text-button)
(insert " ")
(eval clm))
((not (zerop (length clm)))
(insert " " clm))))
(insert "\n"))))
(when overlays