From 8966cbbdc5615051bf0def94d7b6f18e4b295de3 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 14 Apr 2013 03:15:52 +0200 Subject: Disabling company calls while the REPL is working --- elisp/geiser-company.el | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'elisp') diff --git a/elisp/geiser-company.el b/elisp/geiser-company.el index 476cf39..90b1cbb 100644 --- a/elisp/geiser-company.el +++ b/elisp/geiser-company.el @@ -1,6 +1,6 @@ ;; geiser-company.el -- integration with company-mode -;; Copyright (C) 2009, 2010, 2011, 2012 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2011, 2012, 2013 Jose Antonio Ortega Ruiz ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the Modified BSD License. You should @@ -34,20 +34,22 @@ (defun geiser-company--doc (id) (ignore-errors - (let ((help (geiser-autodoc--autodoc `((,id 0))))) - (and help (substring-no-properties help))))) + (when (not (geiser-autodoc--inhibit)) + (let ((help (geiser-autodoc--autodoc `((,id 0))))) + (and help (substring-no-properties help)))))) (defsubst geiser-company--doc-buffer (id) nil) (defun geiser-company--location (id) (ignore-errors - (let ((id (make-symbol id))) - (condition-case nil - (geiser-edit-module id 'noselect) - (error (geiser-edit-symbol id 'noselect)))))) + (when (not (geiser-autodoc--inhibit)) + (let ((id (make-symbol id))) + (condition-case nil + (geiser-edit-module id 'noselect) + (error (geiser-edit-symbol id 'noselect))))))) (defun geiser-company--prefix-at-point () - (when geiser-company--enabled-flag + (when (and (not (geiser-autodoc--inhibit)) geiser-company--enabled-flag) (if (nth 8 (syntax-ppss)) 'stop (let* ((prefix (and (looking-at-p "\\_>") (geiser-completion--prefix nil))) -- cgit v1.2.3