]> git.eshelyaron.com Git - emacs.git/commitdiff
* descr-text.el (describe-char): Don't insert extra newlines.
authorChong Yidong <cyd@gnu.org>
Thu, 9 Aug 2012 08:10:32 +0000 (16:10 +0800)
committerChong Yidong <cyd@gnu.org>
Thu, 9 Aug 2012 08:10:32 +0000 (16:10 +0800)
Fixes: debbugs:10127
lisp/ChangeLog
lisp/descr-text.el

index 533ecae39e2d832cf83268e1839155649f892d1d..c4d54f42cf7c196e6b22e1e04dacaf97a5b8bec1 100644 (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.
 
index 6be33066d5261892412784d8c01c403d95ce4cc9..bf0e413d3573281871e4a8c04afbab15a45a90a1 100644 (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