emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/minibuffer.el,v
Date: Fri, 02 May 2008 17:02:53 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/05/02 17:02:52

Index: minibuffer.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/minibuffer.el,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- minibuffer.el       30 Apr 2008 04:48:27 -0000      1.34
+++ minibuffer.el       2 May 2008 17:02:52 -0000       1.35
@@ -654,17 +654,24 @@
       (setcdr last nil)
       (nconc
        (mapcar
-        (lambda (str)
-          ;; Don't modify the string itself.
-          (setq str (copy-sequence str))
+        (lambda (elem)
+          (let ((str
+                 ;; Don't modify the string itself, but a copy, since the
+                 ;; the string may be read-only or used for other purposes.
+                 ;; Furthermore, since `completions' may come from
+                 ;; display-completion-list, `elem' may be a list.
+                 (if (consp elem)
+                     (car (setq elem (cons (copy-sequence (car elem))
+                                           (cdr elem))))
+                   (setq elem (copy-sequence elem)))))
           (put-text-property 0 com-str-len
                              'font-lock-face 'completions-common-part
                              str)
           (if (> (length str) com-str-len)
               (put-text-property com-str-len (1+ com-str-len)
                                  'font-lock-face 'completions-first-difference
-                                 str))
-          str)
+                                   str)))
+          elem)
         completions)
        base-size))))
 




reply via email to

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