]> git.eshelyaron.com Git - emacs.git/commitdiff
Java Mode: Change the syntax of character @ to prefix syntax
authorFilipp Gunbin <fgunbin@fastmail.fm>
Wed, 14 Apr 2021 19:27:00 +0000 (19:27 +0000)
committerAlan Mackenzie <acm@muc.de>
Wed, 14 Apr 2021 19:27:00 +0000 (19:27 +0000)
lisp/progmodes/cc-langs.el (c-make-mode-syntax-table): Change the syntax of @
as indicated.

lisp/progmodes/cc-langs.el

index 28a1565427772940a7c80e375c61ed1fa3a7f929..4c5d043593ca01f2d96aa54b760635002be394aa 100644 (file)
@@ -378,12 +378,14 @@ The syntax tables aren't stored directly since they're quite large."
        (let ((table (make-syntax-table)))
         (c-populate-syntax-table table)
         ;; Mode specific syntaxes.
-        ,(cond ((or (c-major-mode-is 'objc-mode) (c-major-mode-is 'java-mode))
+        ,(cond ((c-major-mode-is 'objc-mode)
                 ;; Let '@' be part of symbols in ObjC to cope with
                 ;; its compiler directives as single keyword tokens.
                 ;; This is then necessary since it's assumed that
                 ;; every keyword is a single symbol.
                 '(modify-syntax-entry ?@ "_" table))
+               ((c-major-mode-is 'java-mode)
+                '(modify-syntax-entry ?@ "'" table))
                ((c-major-mode-is 'pike-mode)
                 '(modify-syntax-entry ?@ "." table)))
         table)))