emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/ewoc.el [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/ewoc.el [emacs-unicode-2]
Date: Mon, 28 Jun 2004 04:57:11 -0400

Index: emacs/lisp/emacs-lisp/ewoc.el
diff -c emacs/lisp/emacs-lisp/ewoc.el:1.11.6.1 
emacs/lisp/emacs-lisp/ewoc.el:1.11.6.2
*** emacs/lisp/emacs-lisp/ewoc.el:1.11.6.1      Fri Apr 16 12:50:13 2004
--- emacs/lisp/emacs-lisp/ewoc.el       Mon Jun 28 07:29:46 2004
***************
*** 1,6 ****
  ;;; ewoc.el --- utility to maintain a view of a list of objects in a buffer
  
! ;; Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000   Free Software 
Foundation
  
  ;; Author: Per Cederqvist <address@hidden>
  ;;    Inge Wallin <address@hidden>
--- 1,7 ----
  ;;; ewoc.el --- utility to maintain a view of a list of objects in a buffer
  
! ;; Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 04
! ;;      Free Software Foundation
  
  ;; Author: Per Cederqvist <address@hidden>
  ;;    Inge Wallin <address@hidden>
***************
*** 244,250 ****
  
  (defun ewoc--create-node (data pretty-printer pos)
    "Call PRETTY-PRINTER with point set at POS in current buffer.
! Remember the start position. Create a wrapper containing that
  start position and the element DATA."
    (save-excursion
      ;; Remember the position as a number so that it doesn't move
--- 245,251 ----
  
  (defun ewoc--create-node (data pretty-printer pos)
    "Call PRETTY-PRINTER with point set at POS in current buffer.
! Remember the start position.  Create a wrapper containing that
  start position and the element DATA."
    (save-excursion
      ;; Remember the position as a number so that it doesn't move
***************
*** 263,269 ****
  
  (defun ewoc--delete-node-internal (ewoc node)
    "Delete a data string from EWOC.
! Can not be used on the footer. Returns the wrapper that is deleted.
  The start-marker in the wrapper is set to nil, so that it doesn't
  consume any more resources."
    (let ((dll (ewoc--dll ewoc))
--- 264,270 ----
  
  (defun ewoc--delete-node-internal (ewoc node)
    "Delete a data string from EWOC.
! Can not be used on the footer.  Returns the wrapper that is deleted.
  The start-marker in the wrapper is set to nil, so that it doesn't
  consume any more resources."
    (let ((dll (ewoc--dll ewoc))
***************
*** 303,316 ****
  
  PRETTY-PRINTER should be a function that takes one argument, an
  element, and inserts a string representing it in the buffer (at
! point). The string PRETTY-PRINTER inserts may be empty or span
! several linse. A trailing newline will always be inserted
! automatically. The PRETTY-PRINTER should use insert, and not
! insert-before-markers.
! 
! Optional third argument HEADER is a string that will always be
! present at the top of the ewoc. HEADER should end with a
! newline.  Optionaly fourth argument FOOTER is similar, and will
  be inserted at the bottom of the ewoc."
    (let ((new-ewoc
         (ewoc--create (current-buffer)
--- 304,317 ----
  
  PRETTY-PRINTER should be a function that takes one argument, an
  element, and inserts a string representing it in the buffer (at
! point).  The string PRETTY-PRINTER inserts may be empty or span
! several lines.  A trailing newline will always be inserted
! automatically.  The PRETTY-PRINTER should use `insert', and not
! `insert-before-markers'.
! 
! Optional second argument HEADER is a string that will always be
! present at the top of the ewoc.  HEADER should end with a
! newline.  Optional third argument FOOTER is similar, and will
  be inserted at the bottom of the ewoc."
    (let ((new-ewoc
         (ewoc--create (current-buffer)
***************
*** 394,402 ****
  If MAP-FUNCTION returns non-nil the element will be refreshed (its
  pretty-printer will be called once again).
  
! Note that the buffer for EWOC will be current buffer when MAP-FUNCTION
! is called.  MAP-FUNCTION must restore the current buffer to BUFFER before
! it returns, if it changes it.
  
  If more than two arguments are given, the remaining
  arguments will be passed to MAP-FUNCTION."
--- 395,403 ----
  If MAP-FUNCTION returns non-nil the element will be refreshed (its
  pretty-printer will be called once again).
  
! Note that the buffer for EWOC will be the current buffer when
! MAP-FUNCTION is called.  MAP-FUNCTION must restore the current
! buffer before it returns, if it changes it.
  
  If more than two arguments are given, the remaining
  arguments will be passed to MAP-FUNCTION."
***************
*** 411,419 ****
  (defun ewoc-filter (ewoc predicate &rest args)
    "Remove all elements in EWOC for which PREDICATE returns nil.
  Note that the buffer for EWOC will be current-buffer when PREDICATE
! is called. PREDICATE must restore the current buffer before it returns
  if it changes it.
! The PREDICATE is called with the element as its first argument. If any
  ARGS are given they will be passed to the PREDICATE."
    (ewoc--set-buffer-bind-dll-let* ewoc
        ((node (ewoc--node-nth dll 1))
--- 412,420 ----
  (defun ewoc-filter (ewoc predicate &rest args)
    "Remove all elements in EWOC for which PREDICATE returns nil.
  Note that the buffer for EWOC will be current-buffer when PREDICATE
! is called.  PREDICATE must restore the current buffer before it returns
  if it changes it.
! The PREDICATE is called with the element as its first argument.  If any
  ARGS are given they will be passed to the PREDICATE."
    (ewoc--set-buffer-bind-dll-let* ewoc
        ((node (ewoc--node-nth dll 1))
***************
*** 428,434 ****
  (defun ewoc-locate (ewoc &optional pos guess)
    "Return the node that POS (a buffer position) is within.
  POS may be a marker or an integer.  It defaults to point.
! GUESS should be a node that it is likely that POS is near.
  
  If POS points before the first element, the first node is returned.
  If POS points after the last element, the last node is returned.
--- 429,435 ----
  (defun ewoc-locate (ewoc &optional pos guess)
    "Return the node that POS (a buffer position) is within.
  POS may be a marker or an integer.  It defaults to point.
! GUESS should be a node that it is likely to be near POS.
  
  If POS points before the first element, the first node is returned.
  If POS points after the last element, the last node is returned.
***************
*** 497,503 ****
  
  (defun ewoc-invalidate (ewoc &rest nodes)
    "Refresh some elements.
! The pretty-printer that for EWOC will be called for all NODES."
    (ewoc--set-buffer-bind-dll ewoc
      (dolist (node nodes)
        (ewoc--refresh-node (ewoc--pretty-printer ewoc) node))))
--- 498,504 ----
  
  (defun ewoc-invalidate (ewoc &rest nodes)
    "Refresh some elements.
! The pretty-printer set for EWOC will be called for all NODES."
    (ewoc--set-buffer-bind-dll ewoc
      (dolist (node nodes)
        (ewoc--refresh-node (ewoc--pretty-printer ewoc) node))))
***************
*** 564,576 ****
  (defun ewoc-collect (ewoc predicate &rest args)
    "Select elements from EWOC using PREDICATE.
  Return a list of all selected data elements.
! PREDICATE is a function that takes a data element as its first argument.
! The elements on the returned list will appear in the same order as in
! the buffer.  You should not rely on in which order PREDICATE is
! called.
! Note that the buffer the EWOC is displayed in is current-buffer
! when PREDICATE is called.  If PREDICATE must restore current-buffer if
! it changes it.
  If more than two arguments are given the
  remaining arguments will be passed to PREDICATE."
    (ewoc--set-buffer-bind-dll-let* ewoc
--- 565,577 ----
  (defun ewoc-collect (ewoc predicate &rest args)
    "Select elements from EWOC using PREDICATE.
  Return a list of all selected data elements.
! PREDICATE is a function that takes a data element as its first
! argument.  The elements on the returned list will appear in the
! same order as in the buffer.  You should not rely on the order of
! calls to PREDICATE.
! Note that the buffer the EWOC is displayed in is the current
! buffer when PREDICATE is called.  PREDICATE must restore it if it
! changes it.
  If more than two arguments are given the
  remaining arguments will be passed to PREDICATE."
    (ewoc--set-buffer-bind-dll-let* ewoc




reply via email to

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