@@ -257,32 +257,35 @@ Use idomenu (imenu with `ido-mode') for best mileage.")
257
257
:group 'rust-mode
258
258
:syntax-table rust-mode-syntax-table
259
259
260
- ; ; Syntax.
260
+ ; ; Syntax
261
261
(setq-local syntax-propertize-function #'rust-syntax-propertize )
262
262
263
263
; ; Indentation
264
264
(setq-local indent-line-function 'rust-mode-indent-line )
265
265
266
266
; ; Fonts
267
- (setq-local font-lock-defaults '(rust-font-lock-keywords
268
- nil nil nil nil
269
- (font-lock-syntactic-face-function
270
- . rust-mode-syntactic-face-function)))
267
+ (setq-local font-lock-defaults
268
+ '(rust-font-lock-keywords
269
+ nil nil nil nil
270
+ (font-lock-syntactic-face-function
271
+ . rust-mode-syntactic-face-function)))
271
272
272
273
; ; Misc
273
274
(setq-local comment-start " // " )
274
275
(setq-local comment-end " " )
275
276
(setq-local open-paren-in-column-0-is-defun-start nil )
276
277
277
278
; ; Auto indent on }
278
- (setq-local
279
- electric-indent-chars (cons ?} (and (boundp 'electric-indent-chars )
280
- electric-indent-chars)))
279
+ (setq-local electric-indent-chars
280
+ (cons ?} (and (boundp 'electric-indent-chars )
281
+ electric-indent-chars)))
281
282
282
283
; ; Allow paragraph fills for comments
283
284
(setq-local comment-start-skip " \\ (?://[/!]*\\ |/\\ *[*!]?\\ )[[:space:]]*" )
284
285
(setq-local paragraph-start
285
- (concat " [[:space:]]*\\ (?:" comment-start-skip " \\ |\\ */?[[:space:]]*\\ |\\ )$" ))
286
+ (concat " [[:space:]]*\\ (?:"
287
+ comment-start-skip
288
+ " \\ |\\ */?[[:space:]]*\\ |\\ )$" ))
286
289
(setq-local paragraph-separate paragraph-start)
287
290
(setq-local normal-auto-fill-function 'rust-do-auto-fill )
288
291
(setq-local fill-paragraph-function 'rust-fill-paragraph )
@@ -296,7 +299,8 @@ Use idomenu (imenu with `ido-mode') for best mileage.")
296
299
(setq-local beginning-of-defun-function 'rust-beginning-of-defun )
297
300
(setq-local end-of-defun-function 'rust-end-of-defun )
298
301
(setq-local parse-sexp-lookup-properties t )
299
- (setq-local electric-pair-inhibit-predicate 'rust-electric-pair-inhibit-predicate-wrap )
302
+ (setq-local electric-pair-inhibit-predicate
303
+ 'rust-electric-pair-inhibit-predicate-wrap )
300
304
(setq-local electric-pair-skip-self 'rust-electric-pair-skip-self-wrap )
301
305
302
306
(add-hook 'before-save-hook 'rust-before-save-hook nil t )
0 commit comments