From d3ebe747b64e37f4db1d7a488decaa610ad8d38a Mon Sep 17 00:00:00 2001 From: Jakub Darul Date: Thu, 10 Oct 2019 20:21:35 +0200 Subject: [PATCH] fix for +org-company-init-h company-files-regexps initialization --- modules/lang/org/config.el | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 361868680..a6fb02244 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -814,18 +814,11 @@ compelling reason, so..." (sp-local-pair "~" "~" :unless '(:add sp-point-before-word-p +org-sp-in-src-block-p)) (sp-local-pair "=" "=" :unless '(:add sp-point-before-word-p sp-in-math-p +org-sp-in-src-block-p))))) -(defun +org-init-company-h() - (after! company - (setq company-files--regexps - (let* ((root (if (eq system-type 'windows-nt) - "[a-zA-Z]:/" - "/")) - (begin (concat "\\(?:\\.\\{1,2\\}/\\|~/\\|" root "\\)"))) - (list (concat "\"\\(" begin "[^\"\n]*\\)") - (concat "\'\\(" begin "[^\'\n]*\\)") - (concat "file:\\(" begin "[^\]\n]*\\)") - (concat "\\(?:[ \t=]\\|^\\)\\(" begin "[^ \t\n]*\\)")))))) - +(defun +org-init-company-h () + (after! company-files + (setq-local company-files--regexps + (cons "file:\\(\\(?:\\.\\{1,2\\}/\\|~/\\|/\\)[^\]\n]*\\)" + company-files--regexps)))) ;; ;;; Bootstrap