From: Stefan Kangas Date: Sun, 24 Sep 2023 06:05:49 +0000 (+0200) Subject: ; Normalize sort-fields-syntax-table definition X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1cdc5cdc56b2cd78ad8a314dea16bbb8d82b97db;p=emacs.git ; Normalize sort-fields-syntax-table definition * lisp/sort.el (sort-fields-syntax-table): Normalize definition. --- 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'."