From: Dmitry Gutov Date: Fri, 17 Apr 2015 20:34:50 +0000 (+0300) Subject: Accept markers in the data returned by c-a-p-f functions X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/948656327a987ec563c7cbf104e752c6ac4a808f?hp=5fc4a9a0b0c75f4f128ad01ca8befd1928399c86 Accept markers in the data returned by c-a-p-f functions Reported at http://lists.gnu.org/archive/html/help-gnu-emacs/2015-04/msg00297.html --- diff --git a/company-capf.el b/company-capf.el index 4962a26c0..17b739b02 100644 --- a/company-capf.el +++ b/company-capf.el @@ -1,6 +1,6 @@ ;;; company-capf.el --- company-mode completion-at-point-functions back-end -*- lexical-binding: t -*- -;; Copyright (C) 2013-2014 Free Software Foundation, Inc. +;; Copyright (C) 2013-2015 Free Software Foundation, Inc. ;; Author: Stefan Monnier @@ -51,7 +51,7 @@ (data (run-hook-wrapped 'completion-at-point-functions ;; Ignore misbehaving functions. #'completion--capf-wrapper 'optimist))) - (when (and (consp (cdr data)) (numberp (nth 1 data))) data))) + (when (and (consp (cdr data)) (integer-or-marker-p (nth 1 data))) data))) (defun company-capf (command &optional arg &rest _args) "`company-mode' back-end using `completion-at-point-functions'."