update packages
This commit is contained in:
@@ -27,9 +27,6 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
||||
;;; ElDoc
|
||||
|
||||
(require 'cl-lib)
|
||||
(require 'ess-inf)
|
||||
(require 'ess-help)
|
||||
@@ -49,7 +46,10 @@
|
||||
:group 'ess-R
|
||||
:type 'string)
|
||||
|
||||
(defun ess-r-eldoc-function ()
|
||||
|
||||
;;;*;;; ElDoc
|
||||
|
||||
(defun ess-r-eldoc-function (&rest _ignored)
|
||||
"Return the doc string, or nil.
|
||||
If an ESS process is not associated with the buffer, do not try
|
||||
to look up any doc strings."
|
||||
@@ -142,7 +142,7 @@ to look up any doc strings."
|
||||
(format "%s: %s" (propertize funname 'face 'font-lock-function-name-face) doc))))
|
||||
|
||||
|
||||
;;; OBJECTS
|
||||
;;;*;;; OBJECTS
|
||||
|
||||
(defun ess-r-object-completion ()
|
||||
"Return completions at point in a format required by `completion-at-point-functions'."
|
||||
@@ -297,7 +297,7 @@ To be used instead of ESS' completion engine for R versions >= 2.7.0."
|
||||
(mapcar 'cddr ess--cached-sp-objects)))))
|
||||
|
||||
|
||||
;;; ARGUMENTS
|
||||
;;;*;;; ARGUMENTS
|
||||
|
||||
(defvar ess-r--funargs-pre-cache
|
||||
'(("plot"
|
||||
@@ -321,7 +321,7 @@ To be used instead of ESS' completion engine for R versions >= 2.7.0."
|
||||
"Alist of cached arguments for time consuming functions.")
|
||||
|
||||
|
||||
;;; HELP
|
||||
;;;*;;; HELP
|
||||
|
||||
(defun ess-r-get-object-help-string (sym)
|
||||
"Help string for ac."
|
||||
@@ -353,8 +353,8 @@ To be used instead of ESS' completion engine for R versions >= 2.7.0."
|
||||
(buffer-substring-no-properties (point) (point-max)))))))
|
||||
|
||||
|
||||
;;; COMPANY
|
||||
;;; https://company-mode.github.io/
|
||||
;;;*;;; COMPANY
|
||||
;; https://company-mode.github.io
|
||||
|
||||
(defun company-R-objects (command &optional arg &rest ignored)
|
||||
(interactive (list 'interactive))
|
||||
@@ -388,14 +388,17 @@ To be used instead of ESS' completion engine for R versions >= 2.7.0."
|
||||
(args (mapcar (lambda (a) (concat a ess-R-argument-suffix))
|
||||
args)))
|
||||
(all-completions arg args)))
|
||||
(meta (let ((proc (ess-get-next-available-process)))
|
||||
(when (and proc
|
||||
(with-current-buffer (process-buffer proc)
|
||||
(not (file-remote-p default-directory))))
|
||||
;; fixme: ideally meta should be fetched with args
|
||||
(let ((doc (ess-r-get-arg-help-string arg proc)))
|
||||
(replace-regexp-in-string "^ +\\| +$" ""
|
||||
(replace-regexp-in-string "[ \t\n]+" " " doc))))))
|
||||
;; Displaying help for the argument in the echo area is disabled
|
||||
;; by default for performance reasons. It causes delays or hangs (#1062).
|
||||
(meta (when (bound-and-true-p ess-r--company-meta)
|
||||
(let ((proc (ess-get-next-available-process)))
|
||||
(when (and proc
|
||||
(with-current-buffer (process-buffer proc)
|
||||
(not (file-remote-p default-directory))))
|
||||
;; fixme: ideally meta should be fetched with args
|
||||
(let ((doc (ess-r-get-arg-help-string arg proc)))
|
||||
(replace-regexp-in-string "^ +\\| +$" ""
|
||||
(replace-regexp-in-string "[ \t\n]+" " " doc)))))))
|
||||
(sorted t)
|
||||
(require-match 'never)
|
||||
(doc-buffer (company-doc-buffer (ess-r-get-arg-help-string arg)))))
|
||||
@@ -427,8 +430,8 @@ Return format suitable for `completion-at-point-functions'."
|
||||
(lambda (_) " <pkg>"))))
|
||||
|
||||
|
||||
;;; AC SOURCES
|
||||
;;; http://cx4a.org/software/auto-complete/index.html
|
||||
;;;*;;; AC SOURCES
|
||||
;; http://cx4a.org/software/auto-complete/index.html
|
||||
;; auto-complete is de-facto unmaintained, users should switch to `company-mode'.
|
||||
|
||||
(defvar ac-source-R
|
||||
|
||||
Reference in New Issue
Block a user