1
1
; ;; ess-custom.el --- Customize variables for ESS
2
2
3
- ; ; Copyright (C) 1997--2010, 2014 A.J. Rossini, Richard M. Heiberger, Martin
3
+ ; ; Copyright (C) 1997--2010 A.J. Rossini, Richard M. Heiberger, Martin
4
4
; ; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen.
5
- ; ; Copyright (C) 2011--2012 A.J. Rossini, Richard M. Heiberger, Martin Maechler,
5
+ ; ; Copyright (C) 2011--2015 A.J. Rossini, Richard M. Heiberger, Martin Maechler,
6
6
; ; Kurt Hornik, Rodney Sparapani, Stephen Eglen and Vitalie Spinu.
7
7
8
8
; ; Author: A.J. Rossini <[email protected] >
132
132
:prefix " ess-" )
133
133
; ; Variables (not user-changeable)
134
134
135
- (defvar ess-version " 14.11 " ; ; updated by 'make'
135
+ (defvar ess-version " 15.03 " ; ; updated by 'make'
136
136
" Version of ESS currently loaded." )
137
137
138
138
(defvar ess-revision nil ; ; set
@@ -451,8 +451,7 @@ default), doc strings are truncated to fit into minibufer. This
451
451
allows the use of different abbreviation styles with the
452
452
truncation."
453
453
:group 'ess
454
- :type '(choice (const nil ) (const mild) (const normal) (const strong) (const aggressive) (const t ))
455
- )
454
+ :type '(choice (const nil ) (const mild) (const normal) (const strong) (const aggressive) (const t )))
456
455
457
456
458
457
(defcustom ess-use-auto-complete t
@@ -465,15 +464,22 @@ If non-nil add `ac-source-R' and `ac-source-filename' to the
465
464
ESS defines three AC sources `ac-source-R',`ac-source-R-objects'
466
465
and `ac-source-R-args' . See auto-complete package
467
466
documentation (http://cx4a.org/software/auto-complete/) for how
468
- to install your custom sources.
469
- "
467
+ to install your custom sources."
470
468
:group 'ess-extras
471
469
:type '(choice (const t ) (const script-only) (const nil )))
472
470
473
- (defcustom ess-ac-R-argument-suffix " = "
474
- " Suffix appended by `ac-source-R' and `ac-source-R-args' to candidates."
475
- :group 'R
476
- :type 'string )
471
+ (defcustom ess-use-company t
472
+ " If t, activate company support in ess-mode and inferior-ess-mode buffers.
473
+ If non-nil add `company-R-args' and `company-R-objects' to the
474
+ `company-backends' . If 'script-only activate in ess-mode buffers
475
+ only."
476
+ :group 'ess-extras
477
+ :type '(choice (const t ) (const script-only) (const nil )))
478
+
479
+ (defcustom ess-company-arg-prefix-length t
480
+ " Minimum prefix for ess company function argument completion."
481
+ :group 'ess-extras
482
+ :type 'number )
477
483
478
484
(defcustom ess-use-tracebug t
479
485
" If t, load ess-tracebug when R process starts."
@@ -493,15 +499,17 @@ might want to set this to nil.
493
499
(defvar ess-ac-sources nil
494
500
" Dialect specific, ESS specific list of ac-sources" )
495
501
502
+ (defvar ess-company-backends nil
503
+ " Dialect specific, ESS specific list of `company-backends' " )
504
+
496
505
(defvar ess--completing-hist nil
497
506
" Variable to store completion history.
498
507
Used by `ess-completion-read' command." )
499
508
500
509
(defvar ess-smart-operators ()
501
510
" List of smart operators to be used in ESS and IESS modes.
502
511
Not to be set by users. It is redefined by mode specific
503
- settings, such as `ess-R-smart-operators' .
504
- " )
512
+ settings, such as `ess-R-smart-operators' ." )
505
513
(make-variable-buffer-local 'ess-smart-operators )
506
514
507
515
(defvar ess-R-smart-operators nil
@@ -510,15 +518,13 @@ If t, use all. If an axplicit list of operators, use only those
510
518
operators.
511
519
512
520
In current verion of ESS, it controls the behavior of
513
- ess-smart-comma only, but will be enriched in the near future.
514
- " )
521
+ ess-smart-comma only, but will be enriched in the near future." )
515
522
516
523
(defvar ess-no-skip-regexp " [ \t\n ]*\\ '"
517
524
" If `ess-next-code-line' sees this line, it doesn't jump over.
518
525
519
526
Used to avoid annoying jumping by ess-eval.*-and-step to end of
520
- buffer or end chunks etc.
521
- " )
527
+ buffer or end chunks etc." )
522
528
523
529
(defcustom ess-S-assign " <- "
524
530
" String used for left assignment in all S dialects.
@@ -2032,9 +2038,7 @@ from `inferior-ess-primary-prompt' and `inferior-ess-secondary-prompt'.")
2032
2038
(make-obsolete-variable 'ess-search-list nil " ESS[12.09]" )
2033
2039
2034
2040
(defvar ess-sl-modtime-alist nil
2035
- " Alist of modification times for all ess directories accessed this
2036
- session." )
2037
-
2041
+ " Alist of modification times for all ess directories accessed this session." )
2038
2042
(make-variable-buffer-local 'ess-sl-modtime-alist )
2039
2043
2040
2044
(defvar ess-sp-change nil
@@ -2223,12 +2227,10 @@ system described in `ess-font-lock-keywords'.")
2223
2227
(cons " =" 'font-lock-constant-face )
2224
2228
" =" )
2225
2229
2226
-
2227
2230
(defvar ess-fl-keyword:operators
2228
2231
(cons " [-=+></%]+" 'font-lock-constant-face )
2229
2232
" Operators." )
2230
2233
2231
-
2232
2234
; ;; fl-keywords S
2233
2235
(defvar ess-S-fl-keyword:modifiers
2234
2236
(cons (concat " \\ <" (regexp-opt ess-S-modifyiers 'enc-paren ) " \\ >" )
@@ -2275,7 +2277,6 @@ default or not."
2275
2277
:type 'alist )
2276
2278
2277
2279
2278
-
2279
2280
; ;; fl-keywords R
2280
2281
(defvar ess-R-fl-keyword:modifiers
2281
2282
(cons (concat " \\ <" (regexp-opt ess-R-modifyiers 'enc-paren ) " \\ >" )
@@ -2307,8 +2308,11 @@ default or not."
2307
2308
2308
2309
(defvar ess-R-fl-keyword:F&T
2309
2310
(cons " \\ b[FT]\\ b" 'font-lock-type-face )
2310
- " Highlith T and F in addition to TRUE and FALSE in R." )
2311
+ " Highlight T and F in addition to TRUE and FALSE in R." )
2311
2312
2313
+ (defvar ess-R-fl-keyword:%op%
2314
+ (cons " %[^ \t ]*%" 'ess-%op%-face )
2315
+ " Highlight %op% operators." )
2312
2316
2313
2317
(defcustom ess-R-font-lock-keywords
2314
2318
'((ess-R-fl-keyword:modifiers . t )
@@ -2321,7 +2325,8 @@ default or not."
2321
2325
(ess-fl-keyword:operators)
2322
2326
(ess-fl-keyword:delimiters)
2323
2327
(ess-fl-keyword:= )
2324
- (ess-R-fl-keyword:F&T))
2328
+ (ess-R-fl-keyword:F&T)
2329
+ (ess-R-fl-keyword:%op%))
2325
2330
" An alist of available font-lock keywords for the R mode.
2326
2331
The key of each cons cell is a name of the keyword. The value
2327
2332
should be t or nil to indicate if the keyword is active or not."
@@ -2481,21 +2486,23 @@ the variable `ess-help-own-frame' is non-nil."
2481
2486
(defvar ess-numbers-face 'ess-numbers-face
2482
2487
" Face name to use for highlighting numbers." )
2483
2488
2484
- (if (featurep 'xemacs )
2485
- ; ; just to make xemacs not to choke on ESS
2486
- (setq ess-function-call-face font-lock-builtin-face
2487
- ess-numbers-face font-lock-type-face )
2489
+ (defvar ess-%op%-face 'ess-%op%-face
2490
+ " Face name to use for highlighting %op% operators." )
2488
2491
2489
- (defface ess-function-call-face
2490
- '((default (:slant normal :inherit font-lock-function-name-face )))
2491
- " Font Lock face used to highlight function calls in ess buffers."
2492
- :group 'ess )
2492
+ (defface ess-function-call-face
2493
+ '((default (:slant normal :inherit font-lock-function-name-face )))
2494
+ " Font Lock face used to highlight function calls in ess buffers."
2495
+ :group 'ess )
2493
2496
2494
- (defface ess-numbers-face
2495
- '((default (:slant normal :inherit font-lock-type-face )))
2496
- " Font Lock face used to highlight numbers in ess-mode buffers."
2497
- :group 'ess )
2498
- )
2497
+ (defface ess-numbers-face
2498
+ '((default (:slant normal :inherit font-lock-type-face )))
2499
+ " Font Lock face used to highlight numbers in ess-mode buffers."
2500
+ :group 'ess )
2501
+
2502
+ (defface ess-%op%-face
2503
+ '((default (:slant normal :inherit font-lock-keyword-face )))
2504
+ " Font Lock face used to highlight %op% operators in ess-mode buffers."
2505
+ :group 'ess )
2499
2506
2500
2507
2501
2508
(defcustom ess-help-kill-bogus-buffers t
0 commit comments