From 1cdc5cdc56b2cd78ad8a314dea16bbb8d82b97db Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 24 Sep 2023 08:05:49 +0200 Subject: [PATCH] ; Normalize sort-fields-syntax-table definition * lisp/sort.el (sort-fields-syntax-table): Normalize definition. --- lisp/sort.el | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lisp/sort.el b/lisp/sort.el index a9686f92d48..6b008b6644e 100644 --- a/lisp/sort.el +++ b/lisp/sort.el @@ -257,18 +257,15 @@ the sort order." (lambda () (skip-chars-forward "\n")) 'forward-page)))) -(defvar sort-fields-syntax-table nil) -(if sort-fields-syntax-table nil - (let ((table (make-syntax-table)) - (i 0)) - (while (< i 256) - (modify-syntax-entry i "w" table) - (setq i (1+ i))) +(defvar sort-fields-syntax-table + (let ((table (make-syntax-table))) + (dotimes (i 256) + (modify-syntax-entry i "w" table)) (modify-syntax-entry ?\s " " table) (modify-syntax-entry ?\t " " table) (modify-syntax-entry ?\n " " table) (modify-syntax-entry ?\. "_" table) ; for floating pt. numbers. -wsr - (setq sort-fields-syntax-table table))) + table)) (defcustom sort-numeric-base 10 "The default base used by `sort-numeric-fields'." -- 2.39.2