Function: kinsoku

kinsoku is an autoloaded and byte-compiled function defined in kinsoku.el.gz.

Signature

(kinsoku LINEBEG)

Documentation

Go to a line breaking position near point by doing kinsoku processing.

LINEBEG is a buffer position we can't break a line before.

Kinsoku processing is to prohibit specific characters to be placed at beginning of line or at end of line. Characters not to be placed at beginning and end of line have character category > and < respectively. This restriction is dissolved by making a line longer or shorter.

Kinsoku is a Japanese word which originally means ordering to stay in one place, and is used for the text processing described above in the context of text formatting.

Source Code

;; Defined in /usr/src/emacs/lisp/international/kinsoku.el.gz
;;;###autoload
(defun kinsoku (linebeg)
  "Go to a line breaking position near point by doing `kinsoku' processing.
LINEBEG is a buffer position we can't break a line before.

`Kinsoku' processing is to prohibit specific characters to be placed
at beginning of line or at end of line.  Characters not to be placed
at beginning and end of line have character category `>' and `<'
respectively.  This restriction is dissolved by making a line longer or
shorter.

`Kinsoku' is a Japanese word which originally means ordering to stay
in one place, and is used for the text processing described above in
the context of text formatting."
  (if enable-kinsoku
      (if (or (and
	       ;; The character after point can't be placed at beginning
	       ;; of line.
	       (aref (char-category-set (following-char)) ?>)
	       ;; We at first try to dissolve this situation by making a
	       ;; line longer.  If it fails, then try making a line
	       ;; shorter.
	       (not (kinsoku-longer)))
	      ;; The character before point can't be placed at end of line.
	      (aref (char-category-set (preceding-char)) ?<))
	  (kinsoku-shorter linebeg))))