anchor.diff:  (define-key *dired-mode-keymap* "R" 'dired-rename-files)
   (define-key *dired-mode-keymap* "+" 'dired-mkdir)
   
  -(defun dired-first-line-p (marker)
  -  (lem::same-line-p *start-point* marker))
  -
  -(defun dired-last-line-p (marker)
  -  (lem::last-line-p marker))
  +(defun dired-first-line-p (point)
  +  (lem::same-line-p *start-point* point))
  +
  +(defun dired-last-line-p (point)
  +  (lem::last-line-p point))
   
   (define-command dired-update-buffer () ()
     (save-excursion
  
positive.code:     (lem::line-start point)))
  
  (define-command dired-next-directory-line (n) ("p")
    (lem::with-point ((cur-marker (current-point)))
      (loop
        (when (dired-last-line-p cur-marker)
          (return))
        (lem::line-offset cur-marker 1)
        (when (and (eq :directory (lem::text-property-at cur-marker 'type))
                   (>= 0 (decf n)))
          (lem::move-point (current-point) cur-marker)
          (return)))))
  
  (define-command dired-previous-directory-line (n) ("p")
    (lem::with-point ((cur-marker (current-point)))
      (loop
        (when (dired-first-line-p cur-marker)
          (return))
        (lem::line-offset cur-marker -1)
        (when (and (eq :directory (lem::text-property-at cur-marker 'type))
                   (>= 0 (decf n)))
          (lem::move-point (current-point) cur-marker)
          (return)))))
  
  (define-command dired-mark-and-next-line (n) ("p")
  
negative.code:                                             (aref end-groups index))
                                      dirname))
                           (start-file-charpos (+ 2 (aref start-groups index))))
                      (lem::with-point ((start-point (lem::line-start cur-point))
                                        (end-point (lem::line-end cur-point)))
                        (case (char string 0)
                          (#\l
                           (lem::put-text-property start-point end-point 'type :link)
                           (lem::character-offset (lem::line-start cur-point) start-file-charpos)
                           (lem::put-text-property cur-point end-point :attribute *link-attribute*))
                          (#\d
                           (lem::put-text-property start-point end-point 'type :directory)
                           (lem::character-offset (lem::line-start cur-point) start-file-charpos)
                           (lem::put-text-property cur-point end-point :attribute *directory-attribute*))
                          (#\-
                           (lem::put-text-property start-point end-point 'type :file)))
                        (lem::put-text-property start-point end-point 'file filename)))
                    (lem::line-offset cur-point 1)
                    (when (lem::end-line-p cur-point)
                      (return)))))))))))
  
  (defun update-all ()
  