From: Lars Ingebrigtsen Date: Fri, 6 May 2022 20:13:41 +0000 (+0200) Subject: Make elisp-mode-syntax-propertize tighter to reflect syntax X-Git-Tag: emacs-29.0.90~1931^2~7 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=499f5f062efa031228dc20c5153849151f7a7614;p=emacs.git Make elisp-mode-syntax-propertize tighter to reflect syntax * lisp/progmodes/elisp-mode.el (elisp-mode-syntax-propertize): ?\N and #s are case sensitive, so don't case-fold. (And adjust regexps.) --- diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 0b647d247b9..775b6ebab47 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -239,22 +239,23 @@ Comments in the form will be lost." (defun elisp-mode-syntax-propertize (start end) (goto-char start) - (funcall - (syntax-propertize-rules - ;; Empty symbol. - ("##" (0 (unless (nth 8 (syntax-ppss)) - (string-to-syntax "_")))) - ;; Unicode character names. (The longest name is 88 characters - ;; long.) - ("\\?\\\\N{[-A-Z ]\\{,88\\}}" - (0 (unless (nth 8 (syntax-ppss)) - (string-to-syntax "_")))) - ((rx "#" (or (seq (group-n 1 "&" (+ digit)) ?\") ; Bool-vector. - (seq (group-n 1 "s") "(") ; Record. - (seq (group-n 1 (+ "^")) "["))) ; Char-table. - (1 (unless (save-excursion (nth 8 (syntax-ppss (match-beginning 0)))) - (string-to-syntax "'"))))) - start end)) + (let ((case-fold-search nil)) + (funcall + (syntax-propertize-rules + ;; Empty symbol. + ("##" (0 (unless (nth 8 (syntax-ppss)) + (string-to-syntax "_")))) + ;; Unicode character names. (The longest name is 88 characters + ;; long.) + ("\\?\\\\N{[-A-Za-z0-9 ]\\{,100\\}}" + (0 (unless (nth 8 (syntax-ppss)) + (string-to-syntax "_")))) + ((rx "#" (or (seq (group-n 1 "&" (+ digit)) ?\") ; Bool-vector. + (seq (group-n 1 "s") "(") ; Record. + (seq (group-n 1 (+ "^")) "["))) ; Char-table. + (1 (unless (save-excursion (nth 8 (syntax-ppss (match-beginning 0)))) + (string-to-syntax "'"))))) + start end))) (defcustom emacs-lisp-mode-hook nil "Hook run when entering Emacs Lisp mode."