.emacs.d

the most bloated Emacs config on this planet
git clone https://git.trogloxene.org/.emacs.d.git
Log | Files | Refs

commit e4bd5b5e81bdaa93acd1fc5550c76537458bfea4
parent 006605cdbeeefec78eb629050e316d2ea90825bd
Author: andsy10 <andsy1016@gmail.com>
Date:   Sat, 17 Oct 2026 06:59:59 +0800

Simplify cns configuration

Diffstat:
Mlisp/init-segmentation.el | 9++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/lisp/init-segmentation.el b/lisp/init-segmentation.el @@ -27,10 +27,6 @@ ;; word segmentation via `find-word-boundary-function-table' ;; NOT compatible with any other modes that use this char table - (defconst my-cns-boundary-empty-char-table (make-char-table nil) - "Assigned to `find-word-boundary-function-table' inside the -boundary function to avoid unwanted reentrancy.") - (defconst my-cns-boundary-table (let ((tab (make-char-table nil))) (map-char-table @@ -65,13 +61,12 @@ the HànZì run around POS. e.g. (1 3 5) for \"中文分词\"." (defun my-cns-boundary-find-word-boundary (pos limit) "Find the Chinese word boundary near POS bounded by LIMIT.." - (let* ((find-word-boundary-function-table my-cns-boundary-empty-char-table) - (bounds (my-cns-boundary-word-boundaries pos))) + (let ((bounds (my-cns-boundary-word-boundaries pos))) (if (< pos limit) ;; POS is at the first character of a word. (cl-find-if (lambda (b) (> b pos)) bounds) ;; POS is at the last character of a word. - (car (last (cl-remove-if (lambda (b) (> b pos)) (butlast bounds))))))) + (car (last (cl-remove-if (lambda (b) (> b pos)) bounds)))))) (defun my-cns-boundary-mode-enable nil "Enable `my-cns-boundary-mode'."