(eq ?+ (char-after pos))
;; Require properly directional neighborliness.
(memq (case name
- ((n s) 'VERTICAL)
- ((w e) 'HORIZONTAL))
+ ((UP DOWN) 'VERTICAL)
+ ((LEFT RIGHT) 'HORIZONTAL))
(get-text-property pos 'aa2u-components)))
name))
(v (name dir) (let ((bol (line-beginning-position dir))
(unless (or (> bol pos)
(<= eol pos))
(ok name pos))))
- (light (&rest components) (apply 'aa2u-1c
- 'aa2u-ucs-bd-uniform-name
- 'LIGHT components)))
- (let* ((n (v 'n 0))
- (s (v 's 2))
- (w (h 'w -1))
- (e (h 'e 1)))
- (pcase (delq nil (list n s w e))
- (`(n s w e) (light 'VERTICAL 'HORIZONTAL))
- (`(s e) (light 'DOWN 'RIGHT))
- (`(s w) (light 'DOWN 'LEFT))
- (`(n e) (light 'UP 'RIGHT))
- (`(n w) (light 'UP 'LEFT))
- (`(n s e) (light 'VERTICAL 'RIGHT))
- (`(n s w) (light 'VERTICAL 'LEFT))
- (`(n w e) (light 'UP 'HORIZONTAL))
- (`(s w e) (light 'DOWN 'HORIZONTAL))
- (`(n) (light 'UP))
- (`(s) (light 'DOWN))
- (`(w) (light 'LEFT))
- (`(e) (light 'RIGHT))
- (_ nil))))))
+ (two-p (ls) (= 2 (length ls)))
+ (just (&rest args) (delq nil args)))
+ (apply 'aa2u-1c
+ 'aa2u-ucs-bd-uniform-name
+ 'LIGHT
+ (just (pcase (just (v 'UP 0)
+ (v 'DOWN 2))
+ ((pred two-p) 'VERTICAL)
+ (`(,vc) vc)
+ (_ nil))
+ (pcase (just (h 'LEFT -1)
+ (h 'RIGHT 1))
+ ((pred two-p) 'HORIZONTAL)
+ (`(,hc) hc)
+ (_ nil)))))))
(defun aa2u-phase-2 ()
(goto-char (point-min))