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

Re: bug in examples:compare.lisp



>The C-x d command (buffer-to-buffer compare) doesn't work if the
>buffer selected from the dialog doesn't have a pathname (ie, if it's a
>new buffer).  Here's a patch:
>
>(defun select-diff-buffer (current)
>  (car (select-item-from-list
>        (delete-if #'(lambda (w) (typep w 'listener))
>                   (remove current (windows :class 'fred-window :include-invisibles t)))
>        :table-print-function #'(lambda (w stream) (princ (or (window-filename w) (window-title w)) stream))
>        :window-title (format  nil "Compare \"~A\" to:" (window-filename current)))))

Thanx. I've patched our sources.

I have a slight modification that prevents the title of the
select-item-from-list dialog from being "NIL":

(defun select-diff-buffer (current)
  (car (select-item-from-list
        (delete-if #'(lambda (w) (typep w 'listener))
                   (remove current
                           (windows :class 'fred-window
                                    :include-invisibles t)))
        :table-print-function #'(lambda (w stream)
                                  (princ (or (window-filename w)
                                             (window-title w))
                                         stream))
        :window-title (format  nil "Compare \"~A\" to:"
                               (or (window-filename current)
                                   (window-title current))))))