1 ;;; company.el --- extensible inline text completion mechanism
3 ;; Copyright (C) 2009 Nikolaj Schumacher
5 ;; Author: Nikolaj Schumacher <bugs * nschum de>
7 ;; Keywords: abbrev, convenience, matchis
8 ;; URL: http://nschum.de/src/emacs/company/
9 ;; Compatibility: GNU Emacs 23.x
11 ;; This file is NOT part of GNU Emacs.
13 ;; This program is free software; you can redistribute it and/or
14 ;; modify it under the terms of the GNU General Public License
15 ;; as published by the Free Software Foundation; either version 2
16 ;; of the License, or (at your option) any later version.
18 ;; This program is distributed in the hope that it will be useful,
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;; GNU General Public License for more details.
23 ;; You should have received a copy of the GNU General Public License
24 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
34 (eval-when-compile (require 'cl))
36 (add-to-list 'debug-ignored-errors
37 "^Pseudo tooltip frontend cannot be used twice$")
38 (add-to-list 'debug-ignored-errors "^Preview frontend cannot be used twice$")
39 (add-to-list 'debug-ignored-errors "^Echo area cannot be used twice$")
40 (add-to-list 'debug-ignored-errors "^No documentation available$")
48 (defface company-tooltip
49 '((t :background "yellow"
54 (defface company-tooltip-selection
55 '((t :background "orange1"
60 (defface company-tooltip-common
61 '((t :inherit company-tooltip
66 (defface company-tooltip-common-selection
67 '((t :inherit company-tooltip-selection
72 (defcustom company-tooltip-limit 10
77 (defface company-preview
78 '((t :background "blue4"
83 (defface company-preview-common
84 '((t :inherit company-preview
89 (defface company-echo nil
93 (defface company-echo-common
94 '((((background dark)) (:foreground "firebrick1"))
95 (((background light)) (:background "firebrick4")))
99 (defun company-frontends-set (variable value)
101 (let ((remainder value))
102 (setcdr remainder (delq (car remainder) (cdr remainder))))
103 (and (memq 'company-pseudo-tooltip-unless-just-one-frontend value)
104 (memq 'company-pseudo-tooltip-frontend value)
105 (error "Pseudo tooltip frontend cannot be used twice"))
106 (and (memq 'company-preview-if-just-one-frontend value)
107 (memq 'company-preview-frontend value)
108 (error "Preview frontend cannot be used twice"))
109 (and (memq 'company-echo value)
110 (memq 'company-echo-metadata-frontend value)
111 (error "Echo area cannot be used twice"))
112 ;; preview must come last
113 (dolist (f '(company-preview-if-just-one-frontend company-preview-frontend))
115 (setq value (append (delq f value) (list f)))))
116 (set variable value))
118 (defcustom company-frontends '(company-pseudo-tooltip-unless-just-one-frontend
119 company-preview-if-just-one-frontend
120 company-echo-metadata-frontend)
122 :set 'company-frontends-set
124 :type '(repeat (choice (const :tag "echo" company-echo-frontend)
125 (const :tag "pseudo tooltip"
126 company-pseudo-tooltip-frontend)
127 (const :tag "pseudo tooltip, multiple only"
128 company-pseudo-tooltip-unless-just-one-frontend)
129 (const :tag "preview" company-preview-frontend)
130 (const :tag "preview, unique only"
131 company-preview-if-just-one-frontend)
132 (function :tag "custom function" nil))))
134 (defcustom company-backends '(company-elisp company-nxml company-css
135 company-semantic company-oddmuse
139 :type '(repeat (function :tag "function" nil)))
141 (defcustom company-minimum-prefix-length 3
144 :type '(integer :tag "prefix length"))
146 (defvar company-timer nil)
148 (defun company-timer-set (variable value)
150 (when company-timer (cancel-timer company-timer))
151 (when (numberp value)
152 (setq company-timer (run-with-idle-timer value t 'company-idle-begin))))
154 (defcustom company-idle-delay .7
156 :set 'company-timer-set
158 :type '(choice (const :tag "never (nil)" nil)
159 (const :tag "immediate (t)" t)
160 (number :tag "seconds")))
162 ;;; mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
164 (defvar company-mode-map (make-sparse-keymap))
166 (defvar company-active-map
167 (let ((keymap (make-sparse-keymap)))
168 (define-key keymap (kbd "M-n") 'company-select-next)
169 (define-key keymap (kbd "M-p") 'company-select-previous)
170 (define-key keymap "\C-m" 'company-complete-selection)
171 (define-key keymap "\t" 'company-complete-common)
172 (define-key keymap (kbd "<f1>") 'company-show-doc-buffer)
176 (define-minor-mode company-mode
178 nil " comp" company-mode-map
181 (add-hook 'pre-command-hook 'company-pre-command nil t)
182 (add-hook 'post-command-hook 'company-post-command nil t)
183 (company-timer-set 'company-idle-delay
185 (remove-hook 'pre-command-hook 'company-pre-command t)
186 (remove-hook 'post-command-hook 'company-post-command t)
188 (kill-local-variable 'company-point)))
190 ;;; keymaps ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
192 (defvar company-overriding-keymap-bound nil)
193 (make-variable-buffer-local 'company-overriding-keymap-bound)
195 (defvar company-old-keymap nil)
196 (make-variable-buffer-local 'company-old-keymap)
198 (defvar company-my-keymap nil)
199 (make-variable-buffer-local 'company-my-keymap)
201 (defsubst company-enable-overriding-keymap (keymap)
202 (setq company-my-keymap keymap)
203 (when company-overriding-keymap-bound
204 (company-uninstall-map)))
206 (defun company-install-map ()
207 (unless (or company-overriding-keymap-bound
208 (null company-my-keymap))
209 (setq company-old-keymap overriding-terminal-local-map
210 overriding-terminal-local-map company-my-keymap
211 company-overriding-keymap-bound t)))
213 (defun company-uninstall-map ()
214 (when (and company-overriding-keymap-bound
215 (eq overriding-terminal-local-map company-my-keymap))
216 (setq overriding-terminal-local-map company-old-keymap
217 company-overriding-keymap-bound nil)))
220 ;; Emacs calculates the active keymaps before reading the event. That means we
221 ;; cannot change the keymap from a timer. So we send a bogus command.
222 (defun company-ignore ()
225 (global-set-key '[31415926] 'company-ignore)
227 (defun company-input-noop ()
228 (push 31415926 unread-command-events))
230 ;;; backends ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
232 (defun company-grab (regexp &optional expression)
233 (when (looking-back regexp)
234 (or (match-string-no-properties (or expression 0)) "")))
236 (defun company-in-string-or-comment (&optional point)
237 (let ((pos (syntax-ppss)))
238 (or (nth 3 pos) (nth 4 pos) (nth 7 pos))))
240 ;;; completion mechanism ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
242 (defvar company-backend nil)
243 (make-variable-buffer-local 'company-backend)
245 (defvar company-prefix nil)
246 (make-variable-buffer-local 'company-prefix)
248 (defvar company-candidates nil)
249 (make-variable-buffer-local 'company-candidates)
251 (defvar company-candidates-cache nil)
252 (make-variable-buffer-local 'company-candidates-cache)
254 (defvar company-common nil)
255 (make-variable-buffer-local 'company-common)
257 (defvar company-selection 0)
258 (make-variable-buffer-local 'company-selection)
260 (defvar company-selection-changed nil)
261 (make-variable-buffer-local 'company-selection-changed)
263 (defvar company-point nil)
264 (make-variable-buffer-local 'company-point)
266 (defvar company-disabled-backends nil)
268 (defsubst company-strip-prefix (str)
269 (substring str (length company-prefix)))
271 (defsubst company-reformat (candidate)
272 ;; company-ispell needs this, because the results are always lower-case
273 ;; It's mory efficient to fix it only when they are displayed.
274 (concat company-prefix (substring candidate (length company-prefix))))
276 (defsubst company-should-complete (prefix)
277 (and (eq company-idle-delay t)
278 (>= (length prefix) company-minimum-prefix-length)))
280 (defsubst company-call-frontends (command)
281 (dolist (frontend company-frontends)
282 (funcall frontend command)))
284 (defsubst company-set-selection (selection)
285 (setq selection (max 0 (min (1- (length company-candidates)) selection)))
286 (unless (equal selection company-selection)
287 (setq company-selection selection
288 company-selection-changed t)
289 (company-call-frontends 'update)))
291 (defsubst company-calculate-candidates (prefix)
292 (or (setq company-candidates (cdr (assoc prefix company-candidates-cache)))
293 (let ((len (length prefix))
294 (completion-ignore-case (funcall company-backend 'ignore-case))
297 (when (setq prev (cdr (assoc (substring prefix 0 (- len i))
298 company-candidates-cache)))
299 (setq company-candidates (all-completions prefix prev))
302 (setq company-candidates (funcall company-backend 'candidates prefix))
303 (unless (funcall company-backend 'sorted)
304 (setq company-candidates (sort company-candidates 'string<)))))
305 (unless (assoc prefix company-candidates-cache)
306 (push (cons prefix company-candidates) company-candidates-cache))
307 (setq company-selection 0
308 company-prefix prefix)
309 (let ((completion-ignore-case (funcall company-backend 'ignore-case)))
310 (setq company-common (try-completion company-prefix company-candidates)))
311 (when (eq company-common t)
312 (setq company-candidates nil))
315 (defun company-idle-begin ()
317 (not company-candidates)
318 (not (equal (point) company-point))
319 (let ((company-idle-delay t))
321 (when company-candidates
323 (company-post-command)))))
325 (defun company-manual-begin ()
327 (not company-candidates)
328 (let ((company-idle-delay t)
329 (company-minimum-prefix-length 0))
331 ;; Return non-nil if active.
334 (defun company-continue ()
335 (when company-candidates
336 (let ((new-prefix (funcall company-backend 'prefix)))
337 (unless (and (= (- (point) (length new-prefix))
338 (- company-point (length company-prefix)))
339 (or (equal company-prefix new-prefix)
340 (company-calculate-candidates new-prefix)))
341 (setq company-candidates nil)))))
343 (defun company-begin ()
345 (unless company-candidates
347 (dolist (backend company-backends)
348 (unless (fboundp backend)
349 (ignore-errors (require backend nil t)))
350 (if (fboundp backend)
351 (when (setq prefix (funcall backend 'prefix))
352 (when (company-should-complete prefix)
353 (setq company-backend backend)
354 (company-calculate-candidates prefix))
356 (unless (memq backend company-disabled-backends)
357 (push backend company-disabled-backends)
358 (message "Company back-end '%s' could not be initialized"
360 (if company-candidates
362 (setq company-point (point))
363 (company-enable-overriding-keymap company-active-map)
364 (company-call-frontends 'update))
367 (defun company-cancel ()
368 (setq company-backend nil
370 company-candidates nil
371 company-candidates-cache nil
374 company-selection-changed nil
376 (company-call-frontends 'hide)
377 (company-enable-overriding-keymap nil))
379 (defun company-abort ()
381 ;; Don't start again, unless started manually.
382 (setq company-point (point)))
384 (defun company-pre-command ()
385 (unless (eq this-command 'company-show-doc-buffer)
387 (when company-candidates
388 (company-call-frontends 'pre-command))
389 (error (message "Company: An error occurred in pre-command")
390 (message "%s" (error-message-string err))
392 (company-uninstall-map))
394 (defun company-post-command ()
395 (unless (eq this-command 'company-show-doc-buffer)
398 (unless (equal (point) company-point)
400 (when company-candidates
401 (company-call-frontends 'post-command)))
402 (error (message "Company: An error occurred in post-command")
403 (message "%s" (error-message-string err))
405 (company-install-map))
407 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
409 (defun company-select-next ()
411 (when (company-manual-begin)
412 (company-set-selection (1+ company-selection))))
414 (defun company-select-previous ()
416 (when (company-manual-begin)
417 (company-set-selection (1- company-selection))))
419 (defun company-complete-selection ()
421 (when (company-manual-begin)
422 (insert (company-strip-prefix (nth company-selection company-candidates)))
425 (defun company-complete-common ()
427 (when (company-manual-begin)
428 (insert (company-strip-prefix company-common))))
430 (defun company-complete ()
432 (when (company-manual-begin)
433 (if (or company-selection-changed
434 (eq last-command 'company-complete-common))
435 (call-interactively 'company-complete-selection)
436 (call-interactively 'company-complete-common)
437 (setq this-command 'company-complete-common))))
439 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
441 (defconst company-space-strings-limit 100)
443 (defconst company-space-strings
445 (dotimes (i company-space-strings-limit)
446 (push (make-string (- company-space-strings-limit 1 i) ?\ ) lst))
447 (apply 'vector lst)))
449 (defsubst company-space-string (len)
450 (if (< len company-space-strings-limit)
451 (aref company-space-strings len)
452 (make-string len ?\ )))
454 (defsubst company-safe-substring (str from &optional to)
455 (let ((len (length str)))
458 (if (and to (> to len))
459 (concat (substring str from)
460 (company-space-string (- to len)))
461 (substring str from to)))))
463 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
465 (defvar company-last-metadata nil)
466 (make-variable-buffer-local 'company-last-metadata)
468 (defun company-fetch-metadata ()
469 (let ((selected (nth company-selection company-candidates)))
470 (unless (equal selected (car company-last-metadata))
471 (setq company-last-metadata
472 (cons selected (funcall company-backend 'meta selected))))
473 (cdr company-last-metadata)))
475 (defun company-doc-buffer (&optional string)
476 (with-current-buffer (get-buffer-create "*Company meta-data*")
480 (defun company-show-doc-buffer ()
482 (when company-candidates
483 (save-window-excursion
484 (let* ((height (window-height))
485 (row (cdr (posn-col-row (posn-at-point))))
486 (selected (nth company-selection company-candidates))
487 (buffer (funcall company-backend 'doc-buffer selected)))
489 (error "No documentation available.")
490 (display-buffer buffer)
491 (and (< (window-height) height)
492 (< (- (window-height) row 2) company-tooltip-limit)
493 (recenter (- (window-height) row 2)))
495 (when last-input-event
496 (clear-this-command-keys t)
497 (setq unread-command-events (list last-input-event))))))))
499 ;;; pseudo-tooltip ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
501 (defvar company-pseudo-tooltip-overlay nil)
502 (make-variable-buffer-local 'company-pseudo-tooltip-overlay)
504 (defvar company-tooltip-offset 0)
505 (make-variable-buffer-local 'company-tooltip-offset)
507 (defun company-pseudo-tooltip-update-offset (selection num-lines limit)
510 (setq company-tooltip-offset
511 (max (min selection company-tooltip-offset)
512 (- selection -1 limit)))
514 (when (<= company-tooltip-offset 1)
516 (setq company-tooltip-offset 0))
518 (when (>= company-tooltip-offset (- num-lines limit 1))
520 (when (= selection (1- num-lines))
521 (decf company-tooltip-offset)
522 (when (<= company-tooltip-offset 1)
523 (setq company-tooltip-offset 0)
530 (defun company-fill-propertize (line width selected)
531 (setq line (company-safe-substring line 0 width))
532 (add-text-properties 0 width
533 (list 'face (if selected
534 'company-tooltip-selection
535 'company-tooltip)) line)
536 (add-text-properties 0 (length company-common)
537 (list 'face (if selected
538 'company-tooltip-common-selection
539 'company-tooltip-common)) line)
544 (defun company-buffer-lines (beg end)
546 (let ((row (cdr (posn-col-row (posn-at-point))))
548 (while (and (equal (move-to-window-line (incf row)) row)
550 (push (buffer-substring beg (min end (1- (point)))) lines)
553 (push (buffer-substring beg end) lines))
556 (defun company-modify-line (old new offset)
557 (concat (company-safe-substring old 0 offset)
559 (company-safe-substring old (+ offset (length new)))))
561 (defun company-replacement-string (old lines column nl)
563 ;; Inject into old lines.
565 (push (company-modify-line (pop old) (pop lines) column) new))
566 ;; Append whole new lines.
568 (push (company-modify-line "" (pop lines) column) new))
569 (concat (when nl "\n")
570 (mapconcat 'identity (nreverse new) "\n")
573 (defun company-create-lines (column lines selection)
575 (let ((limit (max company-tooltip-limit 3))
584 (setq limit (company-pseudo-tooltip-update-offset selection len limit))
586 (when (> company-tooltip-offset 0)
587 (setq previous (format "...(%d)" company-tooltip-offset)))
589 (setq remainder (- len limit company-tooltip-offset)
590 remainder (when (> remainder 0)
591 (setq remainder (format "...(%d)" remainder))))
593 (decf selection company-tooltip-offset)
594 (setq width (min (length previous) (length remainder))
595 lines (nthcdr company-tooltip-offset lines)
596 len (min limit (length lines))
600 (setq width (max (length (pop lines-copy)) width)))
601 (setq width (min width (- (window-width) column)))
604 (push (propertize (company-safe-substring previous 0 width)
605 'face 'company-tooltip)
609 (push (company-fill-propertize (company-reformat (pop lines))
610 width (equal i selection))
614 (push (propertize (company-safe-substring remainder 0 width)
615 'face 'company-tooltip)
618 (setq lines (nreverse new))))
622 (defun company-pseudo-tooltip-show (row column lines selection)
623 (company-pseudo-tooltip-hide)
624 (unless lines (error "No text provided"))
629 (let* ((lines (company-create-lines column lines selection))
630 (nl (< (move-to-window-line row) row))
633 (move-to-window-line (min (window-height)
634 (+ row company-tooltip-limit)))
636 (old-string (company-buffer-lines beg end))
639 (setq company-pseudo-tooltip-overlay (make-overlay beg end))
641 (overlay-put company-pseudo-tooltip-overlay 'company-old old-string)
642 (overlay-put company-pseudo-tooltip-overlay 'company-column column)
643 (overlay-put company-pseudo-tooltip-overlay 'company-nl nl)
644 (overlay-put company-pseudo-tooltip-overlay 'company-before
645 (company-replacement-string old-string lines column nl))
647 (overlay-put company-pseudo-tooltip-overlay 'window (selected-window)))))
649 (defun company-pseudo-tooltip-show-at-point (pos)
650 (let ((col-row (posn-col-row (posn-at-point pos))))
651 (company-pseudo-tooltip-show (1+ (cdr col-row)) (car col-row)
652 company-candidates company-selection)))
654 (defun company-pseudo-tooltip-edit (lines selection)
655 (let* ((old-string (overlay-get company-pseudo-tooltip-overlay 'company-old))
656 (column (overlay-get company-pseudo-tooltip-overlay 'company-column))
657 (nl (overlay-get company-pseudo-tooltip-overlay 'company-nl))
658 (lines (company-create-lines column lines selection)))
659 (overlay-put company-pseudo-tooltip-overlay 'company-before
660 (company-replacement-string old-string lines column nl))))
662 (defun company-pseudo-tooltip-hide ()
663 (when company-pseudo-tooltip-overlay
664 (delete-overlay company-pseudo-tooltip-overlay)
665 (setq company-pseudo-tooltip-overlay nil)))
667 (defun company-pseudo-tooltip-hide-temporarily ()
668 (when (overlayp company-pseudo-tooltip-overlay)
669 (overlay-put company-pseudo-tooltip-overlay 'invisible nil)
670 (overlay-put company-pseudo-tooltip-overlay 'before-string nil)))
672 (defun company-pseudo-tooltip-unhide ()
673 (when company-pseudo-tooltip-overlay
674 (overlay-put company-pseudo-tooltip-overlay 'invisible t)
675 (overlay-put company-pseudo-tooltip-overlay 'before-string
676 (overlay-get company-pseudo-tooltip-overlay 'company-before))))
678 (defun company-pseudo-tooltip-frontend (command)
680 ('pre-command (company-pseudo-tooltip-hide-temporarily))
682 (unless (overlayp company-pseudo-tooltip-overlay)
683 (company-pseudo-tooltip-show-at-point (- (point)
684 (length company-prefix))))
685 (company-pseudo-tooltip-unhide))
686 ('hide (company-pseudo-tooltip-hide)
687 (setq company-tooltip-offset 0))
688 ('update (when (overlayp company-pseudo-tooltip-overlay)
689 (company-pseudo-tooltip-edit company-candidates
690 company-selection)))))
692 (defun company-pseudo-tooltip-unless-just-one-frontend (command)
693 (unless (and (eq command 'post-command)
694 (not (cdr company-candidates)))
695 (company-pseudo-tooltip-frontend command)))
697 ;;; overlay ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
699 (defvar company-preview-overlay nil)
700 (make-variable-buffer-local 'company-preview-overlay)
702 (defun company-preview-show-at-point (pos)
703 (company-preview-hide)
705 (setq company-preview-overlay (make-overlay pos pos))
707 (let ((completion (company-strip-prefix (nth company-selection
708 company-candidates))))
709 (and (equal pos (point))
710 (not (equal completion ""))
711 (add-text-properties 0 1 '(cursor t) completion))
713 (setq completion (propertize completion 'face 'company-preview))
714 (add-text-properties 0 (- (length company-common) (length company-prefix))
715 '(face company-preview-common) completion)
717 (overlay-put company-preview-overlay 'after-string completion)
718 (overlay-put company-preview-overlay 'window (selected-window))))
720 (defun company-preview-hide ()
721 (when company-preview-overlay
722 (delete-overlay company-preview-overlay)
723 (setq company-preview-overlay nil)))
725 (defun company-preview-frontend (command)
727 ('pre-command (company-preview-hide))
728 ('post-command (company-preview-show-at-point (point)))
729 ('hide (company-preview-hide))))
731 (defun company-preview-if-just-one-frontend (command)
732 (unless (and (eq command 'post-command)
733 (cdr company-candidates))
734 (company-preview-frontend command)))
736 ;;; echo ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
738 (defvar company-echo-last-msg nil)
739 (make-variable-buffer-local 'company-echo-last-msg)
741 (defun company-echo-refresh ()
742 (let ((message-log-max nil))
743 (if company-echo-last-msg
744 (message "%s" company-echo-last-msg)
747 (defun company-echo-show (candidates)
749 ;; Roll to selection.
750 (setq candidates (nthcdr company-selection candidates))
752 (let ((limit (window-width (minibuffer-window)))
756 (setq comp (company-reformat (pop candidates))
757 len (+ len 1 (length comp)))
759 (setq candidates nil)
760 (setq comp (propertize comp 'face 'company-echo))
761 (add-text-properties 0 (length company-common)
762 '(face company-echo-common) comp)
765 (setq company-echo-last-msg (mapconcat 'identity (nreverse msg) " "))
766 (company-echo-refresh)))
768 (defun company-echo-frontend (command)
770 ('pre-command (company-echo-refresh))
771 ('post-command (company-echo-show company-candidates))
772 ('hide (setq company-echo-last-msg nil))))
774 (defun company-echo-metadata-frontend (command)
776 ('pre-command (company-echo-refresh))
777 ('post-command (setq company-echo-last-msg (company-fetch-metadata))
778 (company-echo-refresh))
779 ('hide (setq company-echo-last-msg nil))))
783 ;;; company.el ends here