emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/descr-text.el,v


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/descr-text.el,v
Date: Sun, 01 Jun 2008 04:47:49 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Juanma Barranquero <lektu>      08/06/01 04:47:49

Index: descr-text.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/descr-text.el,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- descr-text.el       6 May 2008 07:57:29 -0000       1.63
+++ descr-text.el       1 Jun 2008 04:47:49 -0000       1.64
@@ -49,13 +49,11 @@
   (let ((pp (condition-case signal
                (pp-to-string sexp)
              (error (prin1-to-string signal)))))
-    (when (string-match "\n\\'" pp)
+    (when (string-match-p "\n\\'" pp)
       (setq pp (substring pp 0 (1- (length pp)))))
-    (if (cond ((string-match "\n" pp)
-              nil)
-             ((> (length pp) (- (window-width) (current-column)))
-              nil)
-             (t t))
+
+    (if (and (not (string-match-p "\n" pp))
+            (<= (length pp) (- (window-width) (current-column))))
        (insert pp)
       (insert-text-button
        "[Show]" 'action `(lambda (&rest ignore)
@@ -493,7 +491,7 @@
                         (cond
                          ((and show-trailing-whitespace
                                (save-excursion (goto-char pos)
-                                               (looking-at "[ \t]+$")))
+                                               (looking-at-p "[ \t]+$")))
                           'trailing-whitespace)
                          ((and nobreak-char-display char (eq char '#xa0))
                           'nobreak-space)
@@ -523,7 +521,7 @@
                (if (eq (car-safe clm) 'insert-text-button)
                    (progn (insert " ") (eval clm))
                  (when (>= (+ (current-column)
-                              (or (string-match "\n" clm)
+                              (or (string-match-p "\n" clm)
                                   (string-width clm))
                               1)
                            (window-width))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]