]> code.delx.au - gnu-emacs-elpa/blobdiff - company.el
Remove the As
[gnu-emacs-elpa] / company.el
index 2e7a8f1ad801281fcc897c3086e5b224066e69e9..86aff7462d80c985bbe1f71942e8ae33696972e3 100644 (file)
@@ -4,7 +4,7 @@
 
 ;; Author: Nikolaj Schumacher
 ;; Maintainer: Dmitry Gutov <dgutov@yandex.ru>
-;; Version: 0.6.4
+;; Version: 0.6.7
 ;; Keywords: abbrev, convenience, matching
 ;; URL: http://company-mode.github.com/
 ;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x, GNU Emacs 24.x
@@ -895,7 +895,10 @@ can retrieve meta-data for them."
 (defun company-manual-begin ()
   (interactive)
   (setq company--explicit-action t)
-  (company-auto-begin))
+  (unwind-protect
+      (company-auto-begin)
+    (unless company-candidates
+      (setq company--explicit-action nil))))
 
 (defun company-other-backend (&optional backward)
   (interactive (list current-prefix-arg))
@@ -1797,7 +1800,7 @@ Returns a negative number if the tooltip should be displayed above point."
                             args))
 
         (overlay-put ov 'company-column column)
-        (overlay-put ov 'company-height (abs height))))))
+        (overlay-put ov 'company-height height)))))
 
 (defun company-pseudo-tooltip-show-at-point (pos)
   (let ((col-row (company--col-row pos)))
@@ -1810,7 +1813,7 @@ Returns a negative number if the tooltip should be displayed above point."
         (height (overlay-get company-pseudo-tooltip-overlay 'company-height)))
     (overlay-put company-pseudo-tooltip-overlay 'company-before
                  (apply 'company--replacement-string
-                        (company--create-lines selection height)
+                        (company--create-lines selection (abs height))
                         (overlay-get company-pseudo-tooltip-overlay
                                      'company-replacement-args)))))
 
@@ -1836,7 +1839,7 @@ Returns a negative number if the tooltip should be displayed above point."
    (point) (overlay-start company-pseudo-tooltip-overlay)))
 
 (defun company-pseudo-tooltip-frontend (command)
-  "`company-mode' front-end similar to a tool-tip but based on overlays."
+  "`company-mode' front-end similar to a tool-tip but based on overlays."
   (case command
     (pre-command (company-pseudo-tooltip-hide-temporarily))
     (post-command
@@ -1906,7 +1909,7 @@ Returns a negative number if the tooltip should be displayed above point."
     (setq company-preview-overlay nil)))
 
 (defun company-preview-frontend (command)
-  "`company-mode' front-end showing the selection as if it had been inserted."
+  "`company-mode' front-end showing the selection as if it had been inserted."
   (case command
     (pre-command (company-preview-hide))
     (post-command (company-preview-show-at-point (point)))
@@ -2010,19 +2013,19 @@ Returns a negative number if the tooltip should be displayed above point."
     (company-echo-show)))
 
 (defun company-echo-frontend (command)
-  "`company-mode' front-end showing the candidates in the echo area."
+  "`company-mode' front-end showing the candidates in the echo area."
   (case command
     (post-command (company-echo-show-soon 'company-echo-format))
     (hide (company-echo-hide))))
 
 (defun company-echo-strip-common-frontend (command)
-  "`company-mode' front-end showing the candidates in the echo area."
+  "`company-mode' front-end showing the candidates in the echo area."
   (case command
     (post-command (company-echo-show-soon 'company-echo-strip-common-format))
     (hide (company-echo-hide))))
 
 (defun company-echo-metadata-frontend (command)
-  "`company-mode' front-end showing the documentation in the echo area."
+  "`company-mode' front-end showing the documentation in the echo area."
   (case command
     (post-command (company-echo-show-when-idle 'company-fetch-metadata))
     (hide (company-echo-hide))))