anchor.diff:      (lem::line-start point)))
   
   (define-command dired-next-directory-line (n) ("p")
  -  (lem::with-point ((cur-marker (current-point)))
  +  (lem::with-point ((cur-point (current-point)))
       (loop
  -      (when (dired-last-line-p cur-marker)
  +      (when (dired-last-line-p cur-point)
           (return))
  -      (lem::line-offset cur-marker 1)
  -      (when (and (eq :directory (lem::text-property-at cur-marker 'type))
  +      (lem::line-offset cur-point 1)
  +      (when (and (eq :directory (lem::text-property-at cur-point 'type))
                    (>= 0 (decf n)))
  -        (lem::move-point (current-point) cur-marker)
  +        (lem::move-point (current-point) cur-point)
           (return)))))
   
   (define-command dired-previous-directory-line (n) ("p")
  -  (lem::with-point ((cur-marker (current-point)))
  +  (lem::with-point ((cur-point (current-point)))
       (loop
  -      (when (dired-first-line-p cur-marker)
  +      (when (dired-first-line-p cur-point)
           (return))
  -      (lem::line-offset cur-marker -1)
  -      (when (and (eq :directory (lem::text-property-at cur-marker 'type))
  +      (lem::line-offset cur-point -1)
  +      (when (and (eq :directory (lem::text-property-at cur-point 'type))
                    (>= 0 (decf n)))
  -        (lem::move-point (current-point) cur-marker)
  +        (lem::move-point (current-point) cur-point)
           (return)))))
   
   (define-command dired-mark-and-next-line (n) ("p")
  
positive.code:   (with-buffer-read-only buffer nil
      (erase-buffer buffer)
      (let ((dirname (probe-file (buffer-directory buffer))))
        (lem::with-point ((cur-marker (lem::buffer-point buffer) :left-inserting))
          (lem::insert-string-at cur-marker
                                 (lem.text-property::make-text-property
                                  (namestring dirname)
                                  :attribute *header-attribute*))
          (lem::insert-char-at cur-marker #\newline 2)
          (let ((output-string (ls-output-string dirname)))
            (lem::insert-string-at cur-marker output-string)
            (lem::buffer-start cur-marker)
            (lem::line-offset cur-marker 3)
            (setf *start-point* (copy-point cur-marker :temporary))
            (loop
              (let ((string (lem::line-string-at cur-marker)))
                (multiple-value-bind (start end start-groups end-groups)
                    (ppcre:scan "^(\\S*)\\s+(\\d+)\\s+(\\S*)\\s+(\\S*)\\s+(\\d+)\\s+(\\S+\\s+\\S+\\s+\\S+)\\s+(.*?)(?: -> .*)?$"
                                string)
                  (declare (ignorable start end start-groups end-groups))
                  (when start
                    (lem::insert-string-at cur-marker "  ")
                    (let* ((index (1- (length start-groups)))
                           (filename (merge-pathnames
                                      (subseq string
  
negative.code: (define-key *dired-mode-keymap* "R" 'dired-rename-files)
  (define-key *dired-mode-keymap* "+" 'dired-mkdir)
  
  (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
  