anchor.diff:        (cond
          ((and
            (syntax-escape-char-p (preceding-char))
  -         (not (syntax-escape-char-p (two-preceding-char)))))
  +         (not (syntax-escape-char-p (char-before-2)))))
          ((not
            (or
             (syntax-escape-char-p c)
  
positive.code:     (unless (next-char 1)
        (return))))
  
  (defun skip-chars-backward (pred &optional not-p)
    (do ()
        ((if (funcall pred (preceding-char))
           not-p
           (not not-p))
         t)
      (unless (prev-char 1)
        (return))))
  
  (defun skip-space-forward ()
    (skip-chars-forward 'syntax-space-char-p))
  
  (defun skip-space-backward ()
    (skip-chars-backward 'syntax-space-char-p))
  
  (defun two-preceding-char ()
    (when (prev-char 1)
      (prog1 (preceding-char)
        (next-char 1))))
  
  (defun three-preceding-char ()
    (when (prev-char 2)
      (prog1 (preceding-char)
        (next-char 2))))
  
  (define-key *global-keymap* "M-C-n" 'forward-list)
  (defcommand forward-list (&optional (n 1)) ("p")
    (dotimes (_ n t)
      (skip-chars-forward 'syntax-open-paren-char-p t)
      (let* ((paren-char (following-char))
             (goal-char (syntax-pair-closed-paren paren-char)))
        (do () (nil)
          (unless (next-char 1)
            (return))
          (unless (and (syntax-escape-char-p (preceding-char))
                       (not (syntax-escape-char-p (two-preceding-char))))
            (let ((c (following-char)))
              (cond
               ((char= c paren-char)
                (forward-list)
                (prev-char 1))
               ((char= c goal-char)
                (next-char 1)
                (return t))
               ((syntax-string-quote-char-p c)
                (skip-string-forward)
                (prev-char 1)))))))))
  
  (define-key *global-keymap* "M-C-p" 'backward-list)
  (defcommand backward-list (&optional (n 1)) ("p")
    (dotimes (_ n t)
      (skip-chars-backward 'syntax-closed-paren-char-p t)
      (let* ((paren-char (preceding-char))
             (goal-char (syntax-pair-open-paren paren-char)))
        (do () (nil)
          (unless (prev-char 1)
            (return))
          (unless (and (syntax-escape-char-p (two-preceding-char))
                       (not (syntax-escape-char-p (three-preceding-char))))
            (let ((c (preceding-char)))
              (cond
               ((char= c paren-char)
                (backward-list)
                (next-char 1))
               ((char= c goal-char)
                (prev-char 1)
                (return t))
               ((syntax-string-quote-char-p c)
                (skip-string-backward)
                (next-char 1)))))))))
  
  (defun skip-string-forward ()
    (skip-chars-forward 'syntax-string-quote-char-p t)
    (let ((goal-char (following-char)))
      (do () (nil)
        (unless (next-char 1)
          (return))
        (unless (and (syntax-escape-char-p (preceding-char))
                     (not (syntax-escape-char-p (two-preceding-char))))
          (when (char= (following-char) goal-char)
            (next-char 1)
            (return t))))))
  
  (defun skip-string-backward ()
    (skip-chars-backward 'syntax-string-quote-char-p t)
    (let ((goal-char (preceding-char)))
      (do () (nil)
        (unless (prev-char 1)
          (return))
        (unless (and (syntax-escape-char-p (two-preceding-char))
                     (not (syntax-escape-char-p (three-preceding-char))))
          (when (char= (preceding-char) goal-char)
            (prev-char 1)
            (return t))))))
  
  (defun skip-symbol-forward ()
    (do () (nil)
      (unless (next-char 1)
        (return))
  
negative.code:           (syntax-word-char-p c)))
          (return t))))))
  
  (define-dir-functions (%forward-sexp %backward-sexp) ()
    ((skip-space-forward skip-space-backward)
     (syntax-open-paren-char-p syntax-closed-paren-char-p)
     (syntax-closed-paren-char-p syntax-open-paren-char-p)
     (following-char preceding-char)
     (preceding-char char-before-2)
     (char-before-2 char-before-3)
     (forward-list-1 backward-list-1)
     (skip-string-forward skip-string-backward)
     (skip-symbol-forward skip-symbol-backward))
    (skip-space-forward)
    (let ((c (following-char)))
      (when (and
             (syntax-escape-char-p (preceding-char))
             (not (syntax-escape-char-p (char-before-2))))
        (next-char 1)
        (setq c (following-char)))
      (cond
       ((syntax-open-paren-char-p c)
        (forward-list-1))
       ((syntax-closed-paren-char-p c)
        nil)
       ((syntax-string-quote-char-p c)
        (skip-string-forward))
       (t
        (skip-symbol-forward)))))
  
  (define-key *global-keymap* "M-C-f" 'forward-sexp)
  (defcommand forward-sexp (n) ("p")
    (dotimes (_ n t)
      (unless (%forward-sexp)
        (return))))
  
  (define-key *global-keymap* "M-C-b" 'backward-sexp)
  (defcommand backward-sexp (n) ("p")
    (dotimes (_ n t)
      (unless (%backward-sexp)
        (return))))
  