summaryrefslogtreecommitdiff
path: root/lisp/descr-text.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-08-09 16:10:32 +0800
committerChong Yidong <cyd@gnu.org>2012-08-09 16:10:32 +0800
commit3e861c8a0d2dfaea07224c1f08cf296ab3c3eb39 (patch)
treefc5e9c5a7986825ff7dbcf3796792e9c4b93f548 /lisp/descr-text.el
parentc7fe9adcd4c114443f3706d7150ff5ce632f8717 (diff)
downloademacs-3e861c8a0d2dfaea07224c1f08cf296ab3c3eb39.tar.gz
* descr-text.el (describe-char): Don't insert extra newlines.
Fixes: debbugs:10127
Diffstat (limited to 'lisp/descr-text.el')
-rw-r--r--lisp/descr-text.el16
1 files changed, 5 insertions, 11 deletions
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 6be33066d52..bf0e413d357 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -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