Function: landmark-cross-qtuple
landmark-cross-qtuple is a byte-compiled function defined in
landmark.el.gz.
Signature
(landmark-cross-qtuple SQUARE1 SQUARE2 DX DY)
Documentation
Cross every square between SQUARE1 and SQUARE2 in the DX, DY direction.
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/landmark.el.gz
(defun landmark-cross-qtuple (square1 square2 dx dy)
"Cross every square between SQUARE1 and SQUARE2 in the DX, DY direction."
(save-excursion ; Not moving point from last square
(let ((depl (landmark-xy-to-index dx dy))
(inhibit-read-only t))
;; WARNING: this function assumes DEPL > 0 and SQUARE2 > SQUARE1
(while (/= square1 square2)
(landmark-goto-square square1)
(setq square1 (+ square1 depl))
(cond
((= dy 0) ; Horizontal
(forward-char 1)
(insert-char ?- (1- landmark-square-width) t)
(delete-region (point) (progn
(skip-chars-forward " \t")
(point))))
((= dx 0) ; Vertical
(let ((landmark-n 1)
(column (current-column)))
(while (< landmark-n landmark-square-height)
(setq landmark-n (1+ landmark-n))
(forward-line 1)
(indent-to column)
(insert ?|))))
((= dx -1) ; 1st Diagonal
(indent-to (prog1 (- (current-column) (/ landmark-square-width 2))
(forward-line (/ landmark-square-height 2))))
(insert ?/))
(t ; 2nd Diagonal
(indent-to (prog1 (+ (current-column) (/ landmark-square-width 2))
(forward-line (/ landmark-square-height 2))))
(insert ?\\))))))
(sit-for 0)) ; Display NOW