summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-langs.el
diff options
context:
space:
mode:
authorFilipp Gunbin <fgunbin@fastmail.fm>2021-04-14 19:27:00 +0000
committerAlan Mackenzie <acm@muc.de>2021-04-14 19:27:00 +0000
commit57347554a13de87eb519cbe49ce718b4bb929d91 (patch)
tree51ff2730e56cd2639b80b6a69d04870592909ee0 /lisp/progmodes/cc-langs.el
parentc2fc0c70292872c65f523a8248fb8a9aef467ccb (diff)
downloademacs-57347554a13de87eb519cbe49ce718b4bb929d91.tar.gz
Java Mode: Change the syntax of character @ to prefix syntax
lisp/progmodes/cc-langs.el (c-make-mode-syntax-table): Change the syntax of @ as indicated.
Diffstat (limited to 'lisp/progmodes/cc-langs.el')
-rw-r--r--lisp/progmodes/cc-langs.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 28a15654277..4c5d043593c 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -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)))