[elpa] externals/kiwix 85c3a05 03/10: Use same initial input for Ivy and Helm and extract the login into function

2020-12-30 Thread Stefan Monnier
branch: externals/kiwix
commit 85c3a054a243474c85e7f2351384455ac60c3542
Author: Stefan Monnier 
Commit: stardiviner 

Use same initial input for Ivy and Helm and extract the login into function
---
 kiwix.el | 28 
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/kiwix.el b/kiwix.el
index 44c0cfd..b044d6e 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -261,15 +261,22 @@ list and return a list result."
(data (request-response-data
   (let ((inhibit-message t))
 (request ajax-url
-  :type "GET"
-  :sync t
-  :headers '(("Content-Type" . "application/json"))
-  :parser #'json-read
-  :success (cl-function
-(lambda (&key data &allow-other-keys)
-  data)))
+ :type "GET"
+ :sync t
+ :headers '(("Content-Type" . "application/json"))
+ :parser #'json-read
+ :success (cl-function
+   (lambda (&key data &allow-other-keys)
+ data)))
   (if (vectorp data) (mapcar 'cdar data)
 
+(defun kiwix--get-thing-at-point ()
+  "Get region select text or symbol at point."
+  (if mark-active
+  (buffer-substring
+   (region-beginning) (region-end))
+(thing-at-point 'symbol)))
+
 ;;;###autoload
 (defun kiwix-at-point ()
   "Search for the symbol at point with `kiwix-query'."
@@ -287,7 +294,7 @@ list and return a list result."
  `(lambda (input)
 (apply 'kiwix-ajax-search-hints
input 
`(,kiwix--selected-library
-   :input (word-at-point)
+   :input (kiwix--get-thing-at-point)
:buffer "*helm kiwix completion candidates*"))
 ('ivy
  (ivy-read "Kiwix related entries: "
@@ -296,10 +303,7 @@ list and return a list result."
  input 
`(,kiwix--selected-library)))
:predicate nil
:require-match nil
-   :initial-input (if mark-active
-  (buffer-substring
-   (region-beginning) 
(region-end))
-(thing-at-point 'symbol))
+   :initial-input (kiwix--get-thing-at-point)
:preselect nil
:def nil
:history nil



[elpa] externals/kiwix e3b9b50 10/10: declare helm, ivy functions to fix byte-compiler warnings

2020-12-30 Thread Stefan Monnier
branch: externals/kiwix
commit e3b9b50a75b8d1377f6cd139d8a4aeaf3e7d1dc5
Author: stardiviner 
Commit: stardiviner 

declare helm, ivy functions to fix byte-compiler warnings
---
 kiwix.el | 4 
 1 file changed, 4 insertions(+)

diff --git a/kiwix.el b/kiwix.el
index 0941cf3..ee317f7 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -134,6 +134,10 @@ Currently Ivy ('ivy) and Helm ('helm) both supported."
   (const :tag "xwidget browser" xwidget-webkit-browse-url))
   :safe #'symbolp)
 
+(declare-function helm "helm")
+(declare-function helm-build-async-source "helm")
+(declare-function ivy-read "ivy")
+
 (defun kiwix--get-library-name (file)
   "Extract library name from library file."
   (replace-regexp-in-string "\\.zim\\'" "" file))



[elpa] externals/kiwix 88d7b5b 08/10: Fix compilation error: functions are not known to be defined

2020-12-30 Thread Stefan Monnier
branch: externals/kiwix
commit 88d7b5b2c2553d1c76ee6180e08e158997ec34d8
Author: stardiviner 
Commit: stardiviner 

Fix compilation error: functions are not known to be defined

helm, helm-build-async-source, ivy-read
---
 kiwix.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kiwix.el b/kiwix.el
index 4a9c2a3..f8e239a 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -290,6 +290,7 @@ list and return a list result."
 (let* ((library kiwix--selected-library)
(query (pcase kiwix-default-completing-read
 ('helm
+ (require 'helm)
  (helm :source (helm-build-async-source 
"kiwix-helm-search-hints"
  :candidates-process
  (lambda (input)
@@ -298,6 +299,7 @@ list and return a list result."
:input (kiwix--get-thing-at-point)
:buffer "*helm kiwix completion candidates*"))
 ('ivy
+ (require 'ivy)
  (ivy-read "Kiwix related entries: "
(lambda (input)
  (apply #'kiwix-ajax-search-hints



[elpa] externals/kiwix 207eb5f 02/10: Fix .zim files matching in candidates

2020-12-30 Thread Stefan Monnier
branch: externals/kiwix
commit 207eb5fc3c60973b993c4e566597576fcd3156b6
Author: Stefan Monnier 
Commit: stardiviner 

Fix .zim files matching in candidates
---
 kiwix.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kiwix.el b/kiwix.el
index 12ac122..44c0cfd 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -135,7 +135,7 @@
 ;;;###autoload
 (defun kiwix--get-library-name (file)
   "Extract library name from library file."
-  (replace-regexp-in-string "\.zim" "" file))
+  (replace-regexp-in-string "\\.zim\\'" "" file))
 
 (defun kiwix-get-libraries ()
   "Check out all available Kiwix libraries."



[elpa] externals/kiwix 42209ba 01/10: bump version to 1.0.1

2020-12-30 Thread Stefan Monnier
branch: externals/kiwix
commit 42209ba3a687e4db2d85de517ae46be1d4fc2a7b
Author: stardiviner 
Commit: stardiviner 

bump version to 1.0.1
---
 kiwix.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kiwix.el b/kiwix.el
index 8d51af3..12ac122 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -8,7 +8,7 @@
 ;; Keywords: kiwix wikipedia
 ;; URL: https://github.com/stardiviner/kiwix.el
 ;; Created: 23th July 2016
-;; Version: 1.0.0
+;; Version: 1.0.1
 ;; Package-Requires: ((emacs "24.4") (request "0.3.0"))
 
 ;; This file is part of GNU Emacs.



[elpa] externals/kiwix 64ca93a 05/10: remove un-necessary the append t argument

2020-12-30 Thread Stefan Monnier
branch: externals/kiwix
commit 64ca93a843f4b07b54a65945946cf3b900450c78
Author: Stefan Monnier 
Commit: stardiviner 

remove un-necessary the append t argument
---
 org-kiwix.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org-kiwix.el b/org-kiwix.el
index 999bf01..8dbfd77 100644
--- a/org-kiwix.el
+++ b/org-kiwix.el
@@ -144,7 +144,7 @@
:store #'org-wikipedia-store-link
:export #'org-wikipedia-export-link
:complete #'org-wikipedia-complete-link)
-  (add-hook 'org-store-link-functions 'org-wikipedia-store-link t))
+  (add-hook 'org-store-link-functions 'org-wikipedia-store-link))
 
 
 



[elpa] externals/kiwix 0acfd6a 04/10: Remove un-necessary autoload cookies, improve config of org-kiwix

2020-12-30 Thread Stefan Monnier
branch: externals/kiwix
commit 0acfd6a6cc8e8aa0d7df2ebda8e6fb697dbf41ea
Author: Stefan Monnier 
Commit: stardiviner 

Remove un-necessary autoload cookies, improve config of org-kiwix
---
 README.org   | 17 +++--
 kiwix.el |  1 -
 org-kiwix.el |  7 +--
 3 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/README.org b/README.org
index e249fcd..cb471e3 100644
--- a/README.org
+++ b/README.org
@@ -89,7 +89,7 @@ 
https://chrome.google.com/webstore/detail/kiwix/donaljnlmapmngakoipdmehbfcioahhk
   :hook (org-load . org-kiwix-setup-link))
 #+end_src
 
-* Setup
+* Setup kiwix-serve
 
 If you use kiwix-serve Docker container, you can create an Systemd unit service
 to auto start Docker container. Here is the systemd unit config file:
@@ -279,7 +279,7 @@ docker container ls --all | grep "kiwix-serve" | cat
 : b47533ecd7f6kiwix/kiwix-serve   "/usr/local/bin/kiwi…"   
3 hours ago Exited (137) 2 minutes ago  
kiwix-serve
 : e2f201e655ackiwix/kiwix-serve   "/usr/local/bin/kiwi…"   
3 hours ago Created 
distracted_hofstadter
 
-* Load
+* Config
 
 ** use-package
 
@@ -287,12 +287,13 @@ docker container ls --all | grep "kiwix-serve" | cat
 (use-package kiwix
   :ensure t
   :after org
+  :custom ((kiwix-server-use-docker t)
+   (kiwix-server-port 8089)
+   (kiwix-default-library "wikipedia_en_all_2016-02.zim") ; 
"wikipedia_zh_all_2015-11.zim"
+   (kiwix-default-browser-function 'eww))
   :commands (kiwix-launch-server kiwix-at-point)
   :init (require 'org-kiwix)
-  (setq kiwix-server-use-docker t
-  kiwix-server-port 8089
-  kiwix-default-library "wikipedia_en_all_2016-02.zim" ; 
"wikipedia_zh_all_2015-11.zim"
-  kiwix-default-browser-function 'eww))
+  :config (add-hook 'org-load-hook #'org-kiwix-setup-link))
 #+end_src
 
 * Usage
@@ -303,6 +304,10 @@ docker container ls --all | grep "kiwix-serve" | cat
 
 ** Org Mode integration
 
+#+begin_src emacs-lisp
+(require 'org-kiwix)
+#+end_src
+
 =[C-c C-l]= to insert link.
 
 The link format is like this:
diff --git a/kiwix.el b/kiwix.el
index b044d6e..414542f 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -132,7 +132,6 @@
   (const :tag "xwidget browser" xwidget-webkit-browse-url))
   :safe #'symbolp)
 
-;;;###autoload
 (defun kiwix--get-library-name (file)
   "Extract library name from library file."
   (replace-regexp-in-string "\\.zim\\'" "" file))
diff --git a/org-kiwix.el b/org-kiwix.el
index 3e68c81..999bf01 100644
--- a/org-kiwix.el
+++ b/org-kiwix.el
@@ -1,6 +1,6 @@
 ;;; org-kiwix.el --- Org Mode link support -*- lexical-binding: t; -*-
 
-;;; Time-stamp: <2020-12-17 08:02:31 stardiviner>
+;;; Time-stamp: <2020-12-29 17:34:08 stardiviner>
 
 ;; Copyright (C) 2019-2020  Free Software Foundation, Inc.
 
@@ -56,7 +56,6 @@
   t
 nil))
 
-;;;###autoload
 (defun kiwix-org-get-library (link)
   "Get library from Org-mode `LINK'."
   (let ((library (catch 'args-out-of-range
@@ -71,7 +70,6 @@
   (kiwix-select-library "en"))
  (t (kiwix-select-library))
 
-;;;###autoload
 (defun org-wikipedia-open-link (link)
   "Open LINK in external Wikipedia program."
   ;; The regexp: (library):query
@@ -100,7 +98,6 @@
 ;; (prin1 (format "library: %s, query: %s, url: %s" library query url))
 (browse-url url)))
 
-;;;###autoload
 (defun org-wikipedia-export-link (link description format)
   "Export the Wikipedia LINK with DESCRIPTION for FORMAT from Org files."
   (when (string-match "\\(?:(\\(.*\\)):\\)?\\([^] \n\t\r]*\\)" link)
@@ -117,7 +114,6 @@
  ((eq format 'latex) (format "\\href{%s}{%s}" path desc))
  (t path))
 
-;;;###autoload
 (defun org-wikipedia-store-link ()
   "Store a link to a Wikipedia link."
   ;; [C-c o C-l l] `org-store-link'
@@ -131,7 +127,6 @@
 :description query)
   link)))
 
-;;;###autoload
 (defun org-wikipedia-complete-link (&optional arg)
   "Use kiwix AJAX request to provide available completion keywords."
   (let* ((query (or arg (read-from-minibuffer "Search keyword: ")))



[elpa] externals/kiwix 601757e 07/10: Add declaration on README about package is GPLv3 licensed

2020-12-30 Thread Stefan Monnier
branch: externals/kiwix
commit 601757eba91e1d6394d28190e9f0af85a7372c9e
Author: stardiviner 
Commit: stardiviner 

Add declaration on README about package is GPLv3 licensed
---
 README.org | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/README.org b/README.org
index cb471e3..bda5957 100644
--- a/README.org
+++ b/README.org
@@ -11,6 +11,13 @@ This =kiwix.el= supports query =kiwix-tools='s =kiwix-serve= 
server through URL
 The =kiwix-serve= server can be started from command-line if you have 
=kiwix-tools=
 installed, or from Docker container [fn:1].
 
+* License & Contribution
+
+This kiwix.el is under GPLv3 license. If you want to contribute or Pull 
Request,
+you need to have signed FSF copyright paper. Here is the start
+
+https://www.gnu.org/prep/maintain/maintain.html#Copyright-Papers
+
 * Install
 
 ** Install Kiwix



[elpa] externals/kiwix b6e2189 09/10: Update kiwix.el commentary about Kiwix installation

2020-12-30 Thread Stefan Monnier
branch: externals/kiwix
commit b6e2189bdab75be92c189004040672d54426bfa8
Author: stardiviner 
Commit: stardiviner 

Update kiwix.el commentary about Kiwix installation
---
 kiwix.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kiwix.el b/kiwix.el
index f8e239a..0941cf3 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -32,7 +32,7 @@
 
  Kiwix installation
 ;;
-;; http://www.kiwix.org
+;; https://github.com/stardiviner/kiwix.el/#install
 
  Config:
 ;;



[elpa] externals/kiwix 86c163c 06/10: Many syntax etc minor fixes

2020-12-30 Thread Stefan Monnier
branch: externals/kiwix
commit 86c163cbc0515e9e516f05e809796087b1d3ba8d
Author: Stefan Monnier 
Commit: stardiviner 

Many syntax etc minor fixes
---
 kiwix.el | 42 --
 org-kiwix.el |  4 ++--
 2 files changed, 22 insertions(+), 24 deletions(-)

diff --git a/kiwix.el b/kiwix.el
index 414542f..4a9c2a3 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -28,7 +28,7 @@
 
 ;;; Commentary:
 
-;;; This currently only works for Linux, not tested for Mac OS X and Windows.
+;;; This currently only works for GNU/Linux, not tested for Mac OS X and 
Windows.
 
  Kiwix installation
 ;;
@@ -93,7 +93,8 @@
   (let ((kiwix-dir "~/.www.kiwix.org/kiwix"))
 (if (and (file-directory-p kiwix-dir) (file-readable-p kiwix-dir))
 kiwix-dir
-  (warn "ERROR: Kiwix profile directory \"~/.www.kiwix.org/kiwix\" is not 
accessible."
+  (warn "ERROR: Kiwix profile directory \"~/.www.kiwix.org/kiwix\" is not 
accessible.")
+  nil)))
 
 (defcustom kiwix-default-data-profile-name
   (when (kiwix-dir-detect)
@@ -116,7 +117,8 @@
 
 (defcustom kiwix-default-completing-read (cond ((fboundp 'ivy-read) 'ivy)
((fboundp 'helm) 'helm))
-  "Kiwix default completion frontend. Currently Ivy ('ivy) and Helm ('helm) 
both supported."
+  "Kiwix default completion frontend.
+Currently Ivy ('ivy) and Helm ('helm) both supported."
   :type 'symbol
   :safe #'symbolp)
 
@@ -260,14 +262,14 @@ list and return a list result."
(data (request-response-data
   (let ((inhibit-message t))
 (request ajax-url
- :type "GET"
- :sync t
- :headers '(("Content-Type" . "application/json"))
- :parser #'json-read
- :success (cl-function
-   (lambda (&key data &allow-other-keys)
- data)))
-  (if (vectorp data) (mapcar 'cdar data)
+  :type "GET"
+  :sync t
+  :headers '(("Content-Type" . "application/json"))
+  :parser #'json-read
+  :success (cl-function
+(lambda (&key data &allow-other-keys)
+  data)))
+  (if (vectorp data) (mapcar #'cdar data)
 
 (defun kiwix--get-thing-at-point ()
   "Get region select text or symbol at point."
@@ -286,20 +288,20 @@ list and return a list result."
   (progn
 (setq kiwix--selected-library (kiwix-select-library))
 (let* ((library kiwix--selected-library)
-   (query (cl-case kiwix-default-completing-read
+   (query (pcase kiwix-default-completing-read
 ('helm
  (helm :source (helm-build-async-source 
"kiwix-helm-search-hints"
  :candidates-process
- `(lambda (input)
-(apply 'kiwix-ajax-search-hints
-   input 
`(,kiwix--selected-library
+ (lambda (input)
+   (apply #'kiwix-ajax-search-hints
+  input 
`(,kiwix--selected-library
:input (kiwix--get-thing-at-point)
:buffer "*helm kiwix completion candidates*"))
 ('ivy
  (ivy-read "Kiwix related entries: "
-   `(lambda (input)
-  (apply 'kiwix-ajax-search-hints
- input 
`(,kiwix--selected-library)))
+   (lambda (input)
+ (apply #'kiwix-ajax-search-hints
+input `(,kiwix--selected-library)))
:predicate nil
:require-match nil
:initial-input (kiwix--get-thing-at-point)
@@ -339,12 +341,8 @@ list and return a list result."
 ;;;###autoload
 (define-minor-mode kiwix-mode
   "Kiwix global minor mode for searching Kiwix serve."
-  :require 'kiwix-mode
-  :init-value nil
   :global t
   :lighter " Kiwix"
-  :group 'kiwix-mode
-  :keymap kiwix-mode-map
   (if kiwix-mode (kiwix-mode-enable) (kiwix-mode-disable)))
 
 
diff --git a/org-kiwix.el b/org-kiwix.el
index 8dbfd77..173d4f6 100644
--- a/org-kiwix.el
+++ b/org-kiwix.el
@@ -1,6 +1,6 @@
 ;;; org-kiwix.el --- Org Mode link support -*- lexical-binding: t; -*-
 
-;;; Time-stamp: <2020-12-29 17:34:08 stardiviner>
+;;; Time-stamp: <2020-12-29 17:50:34 stardiviner>
 
 ;; Copyright (

[elpa] externals/kiwix updated (3e1275d -> e3b9b50)

2020-12-30 Thread Stefan Monnier
monnier pushed a change to branch externals/kiwix.

  from  3e1275d   use better "~" to replace "$HOME" environment variable
   new  42209ba   bump version to 1.0.1
   new  207eb5f   Fix .zim files matching in candidates
   new  85c3a05   Use same initial input for Ivy and Helm and extract the 
login into function
   new  0acfd6a   Remove un-necessary autoload cookies, improve config of 
org-kiwix
   new  64ca93a   remove un-necessary the append t argument
   new  86c163c   Many syntax etc minor fixes
   new  601757e   Add declaration on README about package is GPLv3 licensed
   new  88d7b5b   Fix compilation error: functions are not known to be 
defined
   new  b6e2189   Update kiwix.el commentary about Kiwix installation
   new  e3b9b50   declare helm, ivy functions to fix byte-compiler warnings


Summary of changes:
 README.org   | 24 ++--
 kiwix.el | 55 +++
 org-kiwix.el | 11 +++
 3 files changed, 52 insertions(+), 38 deletions(-)



[elpa] externals/emms updated (4ca4ae8 -> a2738fe)

2020-12-30 Thread Yoni Rabkin
yonirabkin pushed a change to branch externals/emms.

  from  4ca4ae8   * emms-tag-editor.el:
   new  d9c3e21   * doc/developer-release.txt: correct arcane incantation
   new  6995bf6   * doc/developer-release.txt: better incantation
   new  009efa5   * README: update the README for ELPA package display
   new  a2738fe   * Makefile: version bump


Summary of changes:
 Makefile  |  2 +-
 NEWS  |  4 
 README| 16 +---
 doc/developer-release.txt |  2 +-
 emms.el   |  4 ++--
 5 files changed, 21 insertions(+), 7 deletions(-)



[elpa] externals/emms 6995bf6 2/4: * doc/developer-release.txt: better incantation

2020-12-30 Thread Yoni Rabkin
branch: externals/emms
commit 6995bf6ee0cb87a36d2ac462c329326603f8662e
Author: Yoni Rabkin 
Commit: Yoni Rabkin 

* doc/developer-release.txt: better incantation
---
 doc/developer-release.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/developer-release.txt b/doc/developer-release.txt
index fe0f2fa..a09081b 100644
--- a/doc/developer-release.txt
+++ b/doc/developer-release.txt
@@ -26,6 +26,6 @@ Savannah, as a tarball from GNU, and via GNU ELPA.
 
   - merge master into the Savannah "elpa" branch and push to Savannah
 
-  - from the "elpa" branch in Savannah push to elpa.git: "git push elpa 
elpa:refs/heads/externals/emms"
+  - from the "elpa" branch in Savannah push to elpa.git: "git push elpa 
elpa:externals/emms"
 
 * Send announcement email to the emms mailing list



[elpa] externals/emms a2738fe 4/4: * Makefile: version bump

2020-12-30 Thread Yoni Rabkin
branch: externals/emms
commit a2738fe1a9013f641eeba31300e828e88b468b14
Author: Yoni Rabkin 
Commit: Yoni Rabkin 

* Makefile: version bump
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 25585b6..546a355 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ INSTALLINFO = /usr/bin/install-info --info-dir=$(INFODIR)
 CHANGELOG_CMD = git log --pretty=medium --no-merges
 
 # The currently released version of EMMS
-VERSION=6.00
+VERSION=6.03
 
 .PHONY: all install docs clean
 .PRECIOUS: %.elc



[elpa] externals/emms 009efa5 3/4: * README: update the README for ELPA package display

2020-12-30 Thread Yoni Rabkin
branch: externals/emms
commit 009efa58b439fc06a4c6d0749057789ae7103184
Author: Yoni Rabkin 
Commit: Yoni Rabkin 

* README: update the README for ELPA package display
---
 NEWS|  4 
 README  | 16 +---
 emms.el |  4 ++--
 3 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/NEWS b/NEWS
index 24f0420..2e8592b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+News since version 6.2
+
+  - Updated documentation
+
 News since version 5.4
 
   - Emms is now available via the GNU ELPA repository.
diff --git a/README b/README
index 238d4f8..ceeb86c 100644
--- a/README
+++ b/README
@@ -1,3 +1,13 @@
-Please read the fine manual which is available in the doc
-directory. We do our best to make sure that it's up to date and
-informative.
+Emms is the Emacs Multimedia System. Emms displays and plays
+multimedia from within GNU/Emacs using a variety of external players
+and from different sources.
+
+Emms can run as a minimalist player and controlled with a handful of
+M-x Emacs commands, or a fully-fledged, interactive media
+browser. Emms can display album art, play streaming audio, tag music
+files, search for lyrics, provide MPD connectivity, control the
+volume, and more.
+
+Please read the info fine manual which is shipped with Emms and
+available in the doc directory. We do our best to make sure that it's
+up to date and informative.
diff --git a/emms.el b/emms.el
index 3a0258c..1ea73fe 100644
--- a/emms.el
+++ b/emms.el
@@ -5,7 +5,7 @@
 
 ;; Author: Jorgen Schäfer , the Emms developers (see AUTHORS 
file)
 ;; Maintainer: Yoni Rabkin 
-;; Version: 6.02
+;; Version: 6.03
 ;; Keywords: emms, mp3, ogg, flac, music, mpeg, video, multimedia
 ;; Package-Type: multi
 ;; Package-Requires: ((cl-lib "0.5") (seq))
@@ -45,7 +45,7 @@
 
 ;;; Code:
 
-(defvar emms-version "6.00"
+(defvar emms-version "6.03"
   "EMMS version string.")
 
 



[elpa] externals/emms d9c3e21 1/4: * doc/developer-release.txt: correct arcane incantation

2020-12-30 Thread Yoni Rabkin
branch: externals/emms
commit d9c3e214be3be37460fc037c2217a1d74eb8cb07
Author: Yoni Rabkin 
Commit: Yoni Rabkin 

* doc/developer-release.txt: correct arcane incantation
---
 doc/developer-release.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/developer-release.txt b/doc/developer-release.txt
index 7949faa..fe0f2fa 100644
--- a/doc/developer-release.txt
+++ b/doc/developer-release.txt
@@ -26,6 +26,6 @@ Savannah, as a tarball from GNU, and via GNU ELPA.
 
   - merge master into the Savannah "elpa" branch and push to Savannah
 
-  - from the "elpa" branch in Savannah push to elpa.git: "git push elpa 
elpa:/externals/emms"
+  - from the "elpa" branch in Savannah push to elpa.git: "git push elpa 
elpa:refs/heads/externals/emms"
 
 * Send announcement email to the emms mailing list



[elpa] externals/company 10d7ee5 06/46: Remove company-xcode

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 10d7ee573c3b72303693db58b2d1521c5241085c
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Remove company-xcode

Seems like xcodeindex tool has only been present in early versions of XCode.


https://mirror.informatimago.com/next/developer.apple.com/tools/xcode/reviewxcode.html

https://stackoverflow.com/questions/12675182/xcode-4-5-xcodeindex-command-line-tool
---
 NEWS.md  |   1 +
 company-xcode.el | 123 ---
 company.el   |   5 +--
 3 files changed, 3 insertions(+), 126 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index 5b783ca..f0b2b20 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* `company-xcode` has been removed. It has not been useful for years now.
 * `company-clang` has been moved to after `company-capf` in the default value 
of
   `company-backends`. So now if there is an active completion function in
   `completion-at-point-functions`, it will have priority over
diff --git a/company-xcode.el b/company-xcode.el
deleted file mode 100644
index 56da198..000
--- a/company-xcode.el
+++ /dev/null
@@ -1,123 +0,0 @@
-;;; company-xcode.el --- company-mode completion backend for Xcode projects
-
-;; Copyright (C) 2009-2011, 2014  Free Software Foundation, Inc.
-
-;; Author: Nikolaj Schumacher
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see .
-
-
-;;; Commentary:
-;;
-
-;;; Code:
-
-(require 'company)
-(require 'cl-lib)
-
-(defgroup company-xcode nil
-  "Completion backend for Xcode projects."
-  :group 'company)
-
-(defcustom company-xcode-xcodeindex-executable (executable-find "xcodeindex")
-  "Location of xcodeindex executable."
-  :type 'file)
-
-(defvar company-xcode-tags nil)
-
-(defun company-xcode-reset ()
-  "Reset the cached tags."
-  (interactive)
-  (setq company-xcode-tags nil))
-
-(defcustom company-xcode-types
-  '("Class" "Constant" "Enum" "Macro" "Modeled Class" "Structure"
-"Type" "Union" "Function")
-  "The types of symbols offered by `company-xcode'.
-No context-enabled completion is available.  Types like methods will be
-offered regardless of whether the class supports them.  The defaults should be
-valid in most contexts."
-  :set (lambda (variable value)
- (set variable value)
- (company-xcode-reset))
-  :type '(set (const "Category") (const "Class") (const "Class Method")
-  (const "Class Variable") (const "Constant") (const "Enum")
-  (const "Field") (const "Instance Method")
-  (const "Instance Variable") (const "Macro")
-  (const "Modeled Class") (const "Modeled Method")
-  (const "Modeled Property") (const "Property") (const "Protocol")
-  (const "Structure") (const "Type") (const "Union")
-  (const "Variable") (const "Function")))
-
-(defvar-local company-xcode-project 'unknown)
-
-
-
-(defun company-xcode-fetch (project-bundle)
-  (setq project-bundle (directory-file-name project-bundle))
-  (message "Retrieving dump from %s..." project-bundle)
-  (with-temp-buffer
-(let ((default-directory (file-name-directory project-bundle)))
-  (call-process company-xcode-xcodeindex-executable nil (current-buffer)
-nil "dump" "-project"
-(file-name-nondirectory project-bundle) "-quiet")
-  (goto-char (point-min))
-  (let ((regexp (concat "^\\([^\t\n]*\\)\t[^\t\n]*\t"
-(regexp-opt company-xcode-types)
-"\t[^\t\n]*\t[^\t\n]*"))
-candidates)
-(while (re-search-forward regexp nil t)
-  (cl-pushnew (match-string 1) candidates :test #'equal))
-(message "Retrieving dump from %s...done" project-bundle)
-candidates
-
-(defun company-xcode-find-project ()
-  (let ((dir (if buffer-file-name
- (file-name-directory buffer-file-name)
-   (expand-file-name default-directory)))
-(prev-dir nil)
-file)
-(while (not (or file (equal dir prev-dir)))
-  (setq file (car (directory-files dir t ".xcodeproj\\'" t))
-prev-dir dir
-dir (file-name-directory (directory-file-name dir
-file))
-
-(defun company-xcode-tags ()
-  (when (eq compa

[elpa] externals/company updated (24aefbd -> 123b604)

2020-12-30 Thread Dmitry Gutov
dgutov pushed a change to branch externals/company.

  from  24aefbd   Fix some quoting problems in doc strings
   new  c09e7ff   Remove unused variable
   new  520978c   Change the replacement character for non-printables
   new  1b985d1   Set project-vc-merge-submodules to nil [ci skip]
   new  ca231bf   Remove company-eclim
   new  664dd19   Move company-clang to after company-capf
   new  10d7ee5   Remove company-xcode
   new  5eb7d86   Add some clarifications for the Customize interface
   new  e1d5837   Use 'after-string' to render the popup
   new  be8cf44   Tidy up a little
   new  2158fbd   company-tooltip-width-grow-only: New option
   new  57a6554   company-clang--parse-output: Filter out duplicates
   new  9e153fa   Restore Emacs < 26 compatibility
   new  e393785   Add a FIXME
   new  54f60ef   Print the right buffer-local value
   new  63b0535   Fixed badge url.
   new  4462e7d   Merge pull request #1004 from jcs-PR/fix-badge
   new  d6df27f   Rename auto-complete to auto-commit
   new  c1e8972   company-selection: add company-selection-default to have 
better support for non-selection popup
   new  fb9db07   Merge pull request #999 from 
kiennq/bug/company-selection-default
   new  569ff3e   Copy edits
   new  2de0d9a   More copy edits
   new  e1726c4   Typo
   new  0edc87d   Fix a couple of warnings
   new  805637c   company-cmake: property completion candidates
   new  d591282   Merge pull request #1009 from condy0919/cmake
   new  25f6a27   company-echo-format: Handle company-common being nil
   new  bbff400   Fix tooltip background stretching to EOL
   new  8c22b58   Merge pull request #1020 from hlissner/fix-tooltip-bg
   new  18b7b79   Fix company--face-attribute helper
   new  053c50d   Merge pull request #1023 from hlissner/fix-face-helper
   new  c4d205a   Fix company--face-attribute for text-scaled faces
   new  b16b236   Fall back to unremapped 'default face :background
   new  5f5949b   Merge pull request #1024 from hlissner/fix-face-helper
   new  7c25cf4   company-set-selection: adding offset internally instead 
of via caller
   new  dd92593   Merge pull request #1032 from 
kiennq/bug/company-selection-offset
   new  bea3195   Implement `company-select-first' and `company-select-last'
   new  97cfbc3   Merge pull request #1033 from edwargix/master
   new  01f5d10   Fix company-gtags to work with tramp and multiple 
locations.
   new  13e2ada   Avoid calling executable-find for local buffers.
   new  e6fa6c0   Add connection-local caching for gtags executable.
   new  75acbc5   Merge pull request #1037 from Ergus/master
   new  056d19d   Rename a function and add NEWS entry
   new  3a27fd9   company-gtags--executable: Don't create local values 
unnecessarily
   new  dccd04b   company-gtags--fetch-tags: Revert an earlier change
   new  3644a59   company-gtags--executable: Make sure to return the 
detected value
   new  123b604   Merge branch 'master' of 
https://github.com/company-mode/company-mode into externals/company


Summary of changes:
 .dir-locals.el  |   3 +-
 NEWS.md |  25 +++
 README.md   |   2 +-
 company-clang.el|  21 ++-
 company-cmake.el|   1 +
 company-eclim.el| 186 --
 company-gtags.el|  29 +++-
 company-tng.el  | 134 +++-
 company-xcode.el| 123 ---
 company-yasnippet.el|   1 +
 company.el  | 404 +---
 test/core-tests.el  | 145 +++--
 test/frontends-tests.el |   2 +-
 13 files changed, 515 insertions(+), 561 deletions(-)
 delete mode 100644 company-eclim.el
 delete mode 100644 company-xcode.el



[elpa] externals/company 520978c 02/46: Change the replacement character for non-printables

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 520978c062d6b2905854d70d10314a514825eb17
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Change the replacement character for non-printables
---
 company.el  | 5 -
 test/frontends-tests.el | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/company.el b/company.el
index 12cbb17..592c6d1 100644
--- a/company.el
+++ b/company.el
@@ -2629,7 +2629,10 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
   ((match-beginning 1)
;; FIXME: Better char for 'non-printable'?
;; We shouldn't get any of these, but sometimes we might.
-   "\u2017")
+   ;; The official "replacement character" is not supported by some fonts.
+   ;;"\ufffd"
+   "?"
+   )
   ((match-beginning 2)
;; Zero-width non-breakable space.
"")
diff --git a/test/frontends-tests.el b/test/frontends-tests.el
index f7f578e..53400e2 100644
--- a/test/frontends-tests.el
+++ b/test/frontends-tests.el
@@ -215,7 +215,7 @@
  "avatar"))
 (company-candidates-length 2)
 (company-backend 'ignore))
-(should (equal '(" avalis‗e "
+(should (equal '(" avalis?e "
  " avatar   ")
(company--create-lines 0 999)
 



[elpa] externals/company 1b985d1 03/46: Set project-vc-merge-submodules to nil [ci skip]

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 1b985d18667c5b58bce600a83de8d65e82aee390
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Set project-vc-merge-submodules to nil [ci skip]
---
 .dir-locals.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.dir-locals.el b/.dir-locals.el
index 79d9a12..8e92085 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1,4 +1,5 @@
 ((nil . ((indent-tabs-mode . nil)
  (fill-column . 80)
  (sentence-end-double-space . t)
- (emacs-lisp-docstring-fill-column . 75
+ (emacs-lisp-docstring-fill-column . 75)
+ (project-vc-merge-submodules . nil



[elpa] externals/company 664dd19 05/46: Move company-clang to after company-capf

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 664dd19c2f3d088be3c82bfa3abcc589b491b8f1
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Move company-clang to after company-capf
---
 NEWS.md| 5 +
 company.el | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/NEWS.md b/NEWS.md
index a16ff5d..5b783ca 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,11 @@
 
 ## Next
 
+* `company-clang` has been moved to after `company-capf` in the default value 
of
+  `company-backends`. So now if there is an active completion function in
+  `completion-at-point-functions`, it will have priority over
+  `company-clang`. Unless it's `tags-completion-at-point-function` (this one is
+  still skipped explicitly).
 * `company-eclim` has been removed. Eclim is generally not recommended for 
Emacs
   users these days, with
   ([emacs-eclim](https://github.com/emacs-eclim/emacs-eclim/)) declared 
obsolete
diff --git a/company.el b/company.el
index 7906fb3..0c63d0b 100644
--- a/company.el
+++ b/company.el
@@ -338,9 +338,10 @@ This doesn't include the margins and the scroll bar."
   (list 'company-nxml))
   ,@(unless (version<= "26" emacs-version)
   (list 'company-css))
-  company-semantic company-clang
+  company-semantic
   company-xcode company-cmake
   company-capf
+  company-clang
   company-files
   (company-dabbrev-code company-gtags company-etags
company-keywords)



[elpa] externals/company ca231bf 04/46: Remove company-eclim

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit ca231bf9e794883f5669aea4bfb92464ec35427e
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Remove company-eclim
---
 NEWS.md  |   7 +++
 company-eclim.el | 186 ---
 company.el   |   3 +-
 3 files changed, 8 insertions(+), 188 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index f1f1d05..a16ff5d 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,12 @@
 # History of user-visible changes
 
+## Next
+
+* `company-eclim` has been removed. Eclim is generally not recommended for 
Emacs
+  users these days, with
+  ([emacs-eclim](https://github.com/emacs-eclim/emacs-eclim/)) declared 
obsolete
+  in favor of `lsp-java`. Though it used its own backend anyway.
+
 ## 2020-07-26 (0.9.13)
 
 * `company-clang`: error handling is more permissive.
diff --git a/company-eclim.el b/company-eclim.el
deleted file mode 100644
index b37f756..000
--- a/company-eclim.el
+++ /dev/null
@@ -1,186 +0,0 @@
-;;; company-eclim.el --- company-mode completion backend for Eclim
-
-;; Copyright (C) 2009, 2011, 2013, 2015  Free Software Foundation, Inc.
-
-;; Author: Nikolaj Schumacher
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see .
-
-;;; Commentary:
-;;
-;; Using `emacs-eclim' together with (or instead of) this backend is
-;; recommended, as it allows you to use other Eclim features.
-;;
-;; The alternative backend provided by `emacs-eclim' uses `yasnippet'
-;; instead of `company-template' to expand function calls, and it supports
-;; some languages other than Java.
-
-;;; Code:
-
-(require 'company)
-(require 'company-template)
-(require 'cl-lib)
-
-(defgroup company-eclim nil
-  "Completion backend for Eclim."
-  :group 'company)
-
-(defun company-eclim-executable-find ()
-  (let (file)
-(cl-dolist (eclipse-root '("/Applications/eclipse" "/usr/lib/eclipse"
-"/usr/local/lib/eclipse"))
-  (and (file-exists-p (setq file (expand-file-name "plugins" 
eclipse-root)))
-   (setq file (car (last (directory-files file t "^org.eclim_"
-   (file-exists-p (setq file (expand-file-name "bin/eclim" file)))
-   (cl-return file)
-
-(defcustom company-eclim-executable
-  (or (bound-and-true-p eclim-executable)
-  (executable-find "eclim")
-  (company-eclim-executable-find))
-  "Location of eclim executable."
-  :type 'file)
-
-(defcustom company-eclim-auto-save t
-  "Determines whether to save the buffer when retrieving completions.
-eclim can only complete correctly when the buffer has been saved."
-  :type '(choice (const :tag "Off" nil)
- (const :tag "On" t)))
-
-
-
-(defvar-local company-eclim--project-dir 'unknown)
-
-(defvar-local company-eclim--project-name nil)
-
-(declare-function json-read "json")
-(defvar json-array-type)
-
-(defun company-eclim--call-process (&rest args)
-  (let ((coding-system-for-read 'utf-8)
-res)
-(require 'json)
-(with-temp-buffer
-  (if (= 0 (setq res (apply 'call-process company-eclim-executable nil t 
nil
-"-command" args)))
-  (let ((json-array-type 'list))
-(goto-char (point-min))
-(unless (eobp)
-  (json-read)))
-(message "Company-eclim command failed with error %d:\n%s" res
- (buffer-substring (point-min) (point-max)))
-nil
-
-(defun company-eclim--project-list ()
-  (company-eclim--call-process "project_list"))
-
-(defun company-eclim--project-dir ()
-  (if (eq company-eclim--project-dir 'unknown)
-  (let ((dir (locate-dominating-file buffer-file-name ".project")))
-(when dir
-  (setq company-eclim--project-dir
-(directory-file-name
- (expand-file-name dir)
-company-eclim--project-dir))
-
-(defun company-eclim--project-name ()
-  (or company-eclim--project-name
-  (let ((dir (company-eclim--project-dir)))
-(when dir
-  (setq company-eclim--project-name
-(cl-loop for project in (company-eclim--project-list)
- when (equal (cdr (assoc 'path project)) dir)
- return (cdr (assoc 'name project
-
-(defun company-eclim--candidates (prefix)
-  (interactive "d")

[elpa] externals/company c09e7ff 01/46: Remove unused variable

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit c09e7ff23d0d3e1927eb13c312d90aefd6b731b9
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Remove unused variable
---
 company.el | 8 
 1 file changed, 8 deletions(-)

diff --git a/company.el b/company.el
index d460b88..12cbb17 100644
--- a/company.el
+++ b/company.el
@@ -2016,14 +2016,6 @@ uses the search string to filter the completion 
candidates."
   (interactive)
   (company-search-mode 1))
 
-(defvar company-filter-map
-  (let ((keymap (make-keymap)))
-(define-key keymap [remap company-search-printing-char]
-  'company-filter-printing-char)
-(set-keymap-parent keymap company-search-map)
-keymap)
-  "Keymap used for incrementally searching the completion candidates.")
-
 (defun company-filter-candidates ()
   "Start filtering the completion candidates incrementally.
 This works the same way as `company-search-candidates' immediately



[elpa] externals/company e1d5837 08/46: Use 'after-string' to render the popup

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit e1d58370cf1f6b42b929376eab2193bfc0914381
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Use 'after-string' to render the popup

To make possible rendering images in it.

Discussion in 
https://github.com/company-mode/company-mode/pull/996#issuecomment-662743347.
---
 company.el | 34 +++---
 1 file changed, 23 insertions(+), 11 deletions(-)

diff --git a/company.el b/company.el
index 45cfebf..82264e1 100644
--- a/company.el
+++ b/company.el
@@ -2738,9 +2738,23 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
 (company--offset-line (pop lines) offset))
 new))
 
-(let ((str (concat (when nl " \n")
-   (mapconcat 'identity (nreverse new) "\n")
-   "\n")))
+;; TODO: Choose the face most appropriate for each line, instead of
+;; simply forcing :extend to nil.
+(let* ((nl-face (list
+ :extend t
+ :inverse-video nil
+ :background (face-attribute 'default :background)))
+   (str (concat (when nl " \n")
+(apply
+ #'concat
+ (mapcan
+  ;; 
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42552#23
+  (lambda (line) (list line
+  (propertize "\n" 'face nl-face)))
+  (nreverse new))
+  ;; Use add-face-text-property in Emacs 24.4
+  ;; https://debbugs.gnu.org/38563
+  (font-lock-append-text-property 0 (length str) 'face 'default str)
   (when nl (put-text-property 0 1 'cursor t str))
   str)))
 
@@ -2949,14 +2963,12 @@ Returns a negative number if the tooltip should be 
displayed above point."
   (overlay-put ov 'priority 111)
   ;; No (extra) prefix for the first line.
   (overlay-put ov 'line-prefix "")
-  ;; `display' is better
-  ;; (http://debbugs.gnu.org/18285, http://debbugs.gnu.org/20847),
-  ;; but it doesn't work on 0-length overlays.
-  (if (< (overlay-start ov) (overlay-end ov))
-  (overlay-put ov 'display disp)
-(overlay-put ov 'after-string disp)
-(overlay-put ov 'invisible t))
-  (overlay-put ov 'face 'default)
+  (overlay-put ov 'after-string disp)
+  ;; `display' is better than `invisible':
+  ;; https://debbugs.gnu.org/18285
+  ;; https://debbugs.gnu.org/20847
+  ;; https://debbugs.gnu.org/42521
+  (overlay-put ov 'display "")
   (overlay-put ov 'window (selected-window)
 
 (defun company-pseudo-tooltip-guard ()



[elpa] externals/company 9e153fa 12/46: Restore Emacs < 26 compatibility

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 9e153fa5352e3ac2da025feb71aba12da48cf9a2
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Restore Emacs < 26 compatibility

Fixes #1003
---
 company.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/company.el b/company.el
index c1fcdd9..d451b7e 100644
--- a/company.el
+++ b/company.el
@@ -1823,6 +1823,7 @@ each one wraps a part of the input string."
 (defun company--permutations (lst)
   (if (not lst)
   '(nil)
+;; FIXME: Replace with `mapcan' in Emacs 26.
 (cl-mapcan
  (lambda (e)
(mapcar (lambda (perm) (cons e perm))
@@ -2752,7 +2753,7 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
  :background (face-attribute 'default :background)))
(str (apply #'concat
(when nl " \n")
-   (mapcan
+   (cl-mapcan
 ;; 
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42552#23
 (lambda (line) (list line (propertize "\n" 'face 
nl-face)))
 (nreverse new)



[elpa] externals/company 2158fbd 10/46: company-tooltip-width-grow-only: New option

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 2158fbddcef69d8b10bef4a5f9fc828cc2315cb7
Author: Gregory Heytings 
Commit: Dmitry Gutov 

company-tooltip-width-grow-only: New option
---
 NEWS.md|  1 +
 company.el | 12 
 2 files changed, 13 insertions(+)

diff --git a/NEWS.md b/NEWS.md
index f0b2b20..ef0773e 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* New user option `company-tooltip-width-grow-only`.
 * `company-xcode` has been removed. It has not been useful for years now.
 * `company-clang` has been moved to after `company-capf` in the default value 
of
   `company-backends`. So now if there is an active completion function in
diff --git a/company.el b/company.el
index b0d1a6c..c1fcdd9 100644
--- a/company.el
+++ b/company.el
@@ -280,6 +280,11 @@ This doesn't include the margins and the scroll bar."
   :type 'integer
   :package-version '(company . "0.9.5"))
 
+(defcustom company-tooltip-width-grow-only nil
+  "When non-nil, the tooltip width is not allowed to decrease."
+  :type 'boolean
+  :package-version '(company . "0.9.14"))
+
 (defcustom company-tooltip-margin 1
   "Width of margin columns to show around the toolip."
   :type 'integer)
@@ -2477,6 +2482,8 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
 
 (defvar-local company-tooltip-offset 0)
 
+(defvar-local company--tooltip-current-width 0)
+
 (defun company-tooltip--lines-update-offset (selection num-lines limit)
   (cl-decf limit 2)
   (setq company-tooltip-offset
@@ -2823,6 +2830,10 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
   (+ 2 width)
 width
 
+(when company-tooltip-width-grow-only
+  (setq width (max company--tooltip-current-width width))
+  (setq company--tooltip-current-width width))
+
 (let ((items (nreverse items))
   (numbered (if company-show-numbers 0 9))
   new)
@@ -2999,6 +3010,7 @@ Returns a negative number if the tooltip should be 
displayed above point."
(overlay-put company-pseudo-tooltip-overlay
 'company-guard (company-pseudo-tooltip-guard)))
  (company-pseudo-tooltip-unhide))
+(show (setq company--tooltip-current-width 0))
 (hide (company-pseudo-tooltip-hide)
   (setq company-tooltip-offset 0))
 (update (when (overlayp company-pseudo-tooltip-overlay)



[elpa] externals/company e393785 13/46: Add a FIXME

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit e3937857c14da818c55693bc0c6e03164423db96
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Add a FIXME
---
 company.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/company.el b/company.el
index d451b7e..6897c3c 100644
--- a/company.el
+++ b/company.el
@@ -2816,6 +2816,7 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
   (setq annotation (company--clean-string annotation))
   (when company-tooltip-align-annotations
 ;; `lisp-completion-at-point' adds a space.
+;; FIXME: Use `string-trim' in Emacs 24.4
 (setq annotation (comment-string-strip annotation t nil
 (push (cons value annotation) items)
 (setq width (max (+ (length value)



[elpa] externals/company 57a6554 11/46: company-clang--parse-output: Filter out duplicates

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 57a6554db750567917f1192463e2503787f9b883
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

company-clang--parse-output: Filter out duplicates

Fixes #841

Based on a patch by Gregory Heytings.
---
 NEWS.md  |  2 ++
 company-clang.el | 21 -
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index ef0773e..dd7276a 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,8 @@
 
 ## Next
 
+* `company-clang` filters out duplicates
+  ([#841](https://github.com/company-mode/company-mode/issues/841)).
 * New user option `company-tooltip-width-grow-only`.
 * `company-xcode` has been removed. It has not been useful for years now.
 * `company-clang` has been moved to after `company-capf` in the default value 
of
diff --git a/company-clang.el b/company-clang.el
index 1460e09..df458c5 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -136,6 +136,7 @@ or automatically through a custom 
`company-clang-prefix-guesser'."
   (let ((pattern (format company-clang--completion-pattern
  (regexp-quote prefix)))
 (case-fold-search nil)
+(results (make-hash-table :test 'equal :size (/ (point-max) 100)))
 lines match)
 (while (re-search-forward pattern nil t)
   (setq match (match-string-no-properties 1))
@@ -144,11 +145,21 @@ or automatically through a custom 
`company-clang-prefix-guesser'."
   (when (string-match ":" match)
 (setq match (substring match 0 (match-beginning 0)
 (let ((meta (match-string-no-properties 2)))
-  (when (and meta (not (string= match meta)))
-(put-text-property 0 1 'meta
-   (company-clang--strip-formatting meta)
-   match)))
-(push match lines)))
+  ;; Avoiding duplicates:
+  ;; https://github.com/company-mode/company-mode/issues/841
+  (cond
+   ;; Either meta != completion (not a macro)
+   ((not (equal match meta))
+(puthash match meta results))
+   ;; Or it's the first time we see this completion
+   ((eq (gethash match results 'none) 'none)
+(puthash match nil results))
+(maphash
+ (lambda (match meta)
+   (when meta
+ (put-text-property 0 1 'meta (company-clang--strip-formatting meta) 
match))
+   (push match lines))
+ results)
 lines))
 
 (defun company-clang--meta (candidate)



[elpa] externals/company 5eb7d86 07/46: Add some clarifications for the Customize interface

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 5eb7d868c2a13bbfb14060b79d69f0d59f6a5f60
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Add some clarifications for the Customize interface
---
 company.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/company.el b/company.el
index cb814b5..45cfebf 100644
--- a/company.el
+++ b/company.el
@@ -307,16 +307,16 @@ This doesn't include the margins and the scroll bar."
 (company-capf . "completion-at-point-functions")
 (company-clang . "Clang")
 (company-cmake . "CMake")
-(company-css . "CSS")
+(company-css . "CSS (obsolete backend)")
 (company-dabbrev . "dabbrev for plain text")
 (company-dabbrev-code . "dabbrev for code")
-(company-elisp . "Emacs Lisp")
+(company-elisp . "Emacs Lisp (obsolete backend)")
 (company-etags . "etags")
 (company-files . "Files")
 (company-gtags . "GNU Global")
 (company-ispell . "Ispell")
 (company-keywords . "Programming language keywords")
-(company-nxml . "nxml")
+(company-nxml . "nxml (obsolete backend)")
 (company-oddmuse . "Oddmuse")
 (company-semantic . "Semantic")
 (company-tempo . "Tempo templates")))



[elpa] externals/company be8cf44 09/46: Tidy up a little

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit be8cf44c6eeddf0ea66f842f6287e7961f20a05a
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Tidy up a little
---
 company.el | 17 +++--
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/company.el b/company.el
index 82264e1..b0d1a6c 100644
--- a/company.el
+++ b/company.el
@@ -2738,20 +2738,17 @@ If SHOW-VERSION is non-nil, show the version in the 
echo area."
 (company--offset-line (pop lines) offset))
 new))
 
-;; TODO: Choose the face most appropriate for each line, instead of
-;; simply forcing :extend to nil.
+;; XXX: Also see branch 'more-precise-extend'.
 (let* ((nl-face (list
  :extend t
  :inverse-video nil
  :background (face-attribute 'default :background)))
-   (str (concat (when nl " \n")
-(apply
- #'concat
- (mapcan
-  ;; 
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42552#23
-  (lambda (line) (list line
-  (propertize "\n" 'face nl-face)))
-  (nreverse new))
+   (str (apply #'concat
+   (when nl " \n")
+   (mapcan
+;; 
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42552#23
+(lambda (line) (list line (propertize "\n" 'face 
nl-face)))
+(nreverse new)
   ;; Use add-face-text-property in Emacs 24.4
   ;; https://debbugs.gnu.org/38563
   (font-lock-append-text-property 0 (length str) 'face 'default str)



[elpa] externals/company 4462e7d 16/46: Merge pull request #1004 from jcs-PR/fix-badge

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 4462e7d399c3d2e1ea1f5d018f4537f1f3d5acfc
Merge: 54f60ef 63b0535
Author: Dmitry Gutov 
Commit: GitHub 

Merge pull request #1004 from jcs-PR/fix-badge

Fixed badge url
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 1e0e5e6..b466d66 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
 See the [homepage](http://company-mode.github.com/).
 
 [![Build 
Status](https://travis-ci.org/company-mode/company-mode.png?branch=master)](https://travis-ci.org/company-mode/company-mode)
-[![Melpa 
Status](http://melpa.milkbox.net/packages/company-badge.svg)](http://melpa.milkbox.net/#/company)
+[![MELPA](https://melpa.org/packages/company-badge.svg)](https://melpa.org/#/company)



[elpa] externals/company 25f6a27 26/46: company-echo-format: Handle company-common being nil

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 25f6a2717ade173c37dc4d013ce68312673596d7
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

company-echo-format: Handle company-common being nil
---
 company.el | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/company.el b/company.el
index 1dd389d..c6847b5 100644
--- a/company.el
+++ b/company.el
@@ -3238,10 +3238,12 @@ Delay is determined by `company-tooltip-idle-delay'."
  'face 'company-echo))
   (cl-incf len 3)
   (cl-incf i)
-  (add-text-properties 3 (+ 3 (string-width company-common))
+  ;; FIXME: Add support for the `match' backend action, and thus,
+  ;; non-prefix matches.
+  (add-text-properties 3 (+ 3 (string-width (or company-common 
"")))
'(face company-echo-common) comp))
   (setq comp (propertize comp 'face 'company-echo))
-  (add-text-properties 0 (string-width company-common)
+  (add-text-properties 0 (string-width (or company-common ""))
'(face company-echo-common) comp))
 (if (>= len limit)
 (setq candidates nil)



[elpa] externals/company 63b0535 15/46: Fixed badge url.

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 63b053585aa9eda0f07fe8209f64171ba3ead8e4
Author: Jen-Chieh 
Commit: Jen-Chieh 

Fixed badge url.
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 1e0e5e6..b466d66 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
 See the [homepage](http://company-mode.github.com/).
 
 [![Build 
Status](https://travis-ci.org/company-mode/company-mode.png?branch=master)](https://travis-ci.org/company-mode/company-mode)
-[![Melpa 
Status](http://melpa.milkbox.net/packages/company-badge.svg)](http://melpa.milkbox.net/#/company)
+[![MELPA](https://melpa.org/packages/company-badge.svg)](https://melpa.org/#/company)



[elpa] externals/company e1726c4 22/46: Typo

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit e1726c46f042adac1dc4ecf5066df6a336fbaf1d
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Typo
---
 NEWS.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/NEWS.md b/NEWS.md
index 9b48ea4..e89cd59 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -3,7 +3,7 @@
 ## Next
 
 * `company-tng-mode` has been added to replace both
-  `company-tng-configure-default' and the manual method of enabling
+  `company-tng-configure-default` and the manual method of enabling
   `company-tng-frontend` (see also `company-tng-auto-configure`). Also,
   `company-selection` can now have `nil` value, which means no selection.
 * `company-auto-complete` and `company-auto-complete-chars` have been renamed 
to



[elpa] externals/company d6df27f 17/46: Rename auto-complete to auto-commit

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit d6df27f1652ae56178ce64b9c1022ec90c850e1a
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Rename auto-complete to auto-commit

#1005
---
 NEWS.md|  2 ++
 company.el | 69 ++
 test/core-tests.el | 20 
 3 files changed, 50 insertions(+), 41 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index dd7276a..d93c873 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,8 @@
 
 ## Next
 
+* `company-auto-complete` and `company-auto-complete-chars` have been renamed 
to
+  `company-auto-commit` and `company-auto-commit-chars` respectively.
 * `company-clang` filters out duplicates
   ([#841](https://github.com/company-mode/company-mode/issues/841)).
 * New user option `company-tooltip-width-grow-only`.
diff --git a/company.el b/company.el
index a43eb32..401a6a2 100644
--- a/company.el
+++ b/company.el
@@ -548,34 +548,45 @@ prefix it was started from."
 This can be a function do determine if a match is required.
 
 This can be overridden by the backend, if it returns t or `never' to
-`require-match'.  `company-auto-complete' also takes precedence over this."
+`require-match'.  `company-auto-commit' also takes precedence over this."
   :type '(choice (const :tag "Off" nil)
  (function :tag "Predicate function")
  (const :tag "On, if user interaction took place"
 'company-explicit-action-p)
  (const :tag "On" t)))
 
-(defcustom company-auto-complete nil
-  "Determines when to auto-complete.
-If this is enabled, all characters from `company-auto-complete-chars'
+(define-obsolete-variable-alias
+  'company-auto-complete
+  'company-auto-commit
+  "0.9.14")
+
+(defcustom company-auto-commit nil
+  "Determines whether to auto-commit.
+If this is enabled, all characters from `company-auto-commit-chars'
 trigger insertion of the selected completion candidate.
 This can also be a function."
   :type '(choice (const :tag "Off" nil)
  (function :tag "Predicate function")
  (const :tag "On, if user interaction took place"
 'company-explicit-action-p)
- (const :tag "On" t)))
+ (const :tag "On" t))
+  :package-version '(company . "0.9.14"))
+
+(define-obsolete-variable-alias
+  'company-auto-complete-chars
+  'company-auto-commit-chars
+  "0.9.14")
 
-(defcustom company-auto-complete-chars '(?\  ?\) ?.)
-  "Determines which characters trigger auto-completion.
-See `company-auto-complete'.  If this is a string, each string character
-triggers auto-completion.  If it is a list of syntax description characters 
(see
-`modify-syntax-entry'), all characters with that syntax auto-complete.
+(defcustom company-auto-commit-chars '(?\  ?\) ?.)
+  "Determines which characters trigger auto-commit.
+See `company-auto-commit'.  If this is a string, each character in it
+triggers auto-commit.  If it is a list of syntax description characters (see
+`modify-syntax-entry'), characters with any of those syntaxes do that.
 
 This can also be a function, which is called with the new input and should
-return non-nil if company should auto-complete.
+return non-nil if company should auto-commit.
 
-A character that is part of a valid candidate never triggers auto-completion."
+A character that is part of a valid completion never triggers auto-commit."
   :type '(choice (string :tag "Characters")
  (set :tag "Syntax"
   (const :tag "Whitespace" ?\ )
@@ -592,7 +603,8 @@ A character that is part of a valid candidate never 
triggers auto-completion."
   (const :tag "Character-quote." ?/)
   (const :tag "Generic string fence." ?|)
   (const :tag "Generic comment fence." ?!))
- (function :tag "Predicate function")))
+ (function :tag "Predicate function"))
+  :package-version '(company . "0.9.14"))
 
 (defcustom company-idle-delay .5
   "The idle delay in seconds until completion starts automatically.
@@ -1105,10 +1117,6 @@ matches IDLE-BEGIN-AFTER-RE, return it wrapped in a 
cons."
 
 (defvar-local company--manual-prefix nil)
 
-(defvar company--auto-completion nil
-  "Non-nil when current candidate is being inserted automatically.
-Controlled by `company-auto-complete'.")
-
 (defvar-local company--point-max nil)
 
 (defvar-local company-point nil)
@@ -1509,18 +1517,18 @@ prefix match (same case) will be prioritized."
  (funcall company-require-match)
(eq company-require-match t))
 
-(defun company-auto-complete-p (input)
-  "Return non-nil if INPUT should trigger auto-completion."
-  (and (if (functionp company-auto-complete)
-   (funcall company-auto-complete)
- company-auto-complete)
-   (if (functionp company-auto-complete-chars)
-   (funcall company-auto-complete-chars input)
- (if (co

[elpa] externals/company 805637c 24/46: company-cmake: property completion candidates

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 805637cec9726bb6c02ac2386796227db3d27cf7
Author: condy 
Commit: condy 

company-cmake: property completion candidates
---
 company-cmake.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/company-cmake.el b/company-cmake.el
index 1bfb20b..5a05c75 100644
--- a/company-cmake.el
+++ b/company-cmake.el
@@ -40,6 +40,7 @@
 (defvar company-cmake-executable-arguments
   '("--help-command-list"
 "--help-module-list"
+"--help-property-list"
 "--help-variable-list")
   "The arguments we pass to cmake, separately.
 They affect which types of symbols we get completion candidates for.")



[elpa] externals/company 97cfbc3 37/46: Merge pull request #1033 from edwargix/master

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 97cfbc3967c195fb4ccb171735b9b1dea97e681a
Merge: dd92593 bea3195
Author: Dmitry Gutov 
Commit: GitHub 

Merge pull request #1033 from edwargix/master

Implement `company-select-first' and `company-select-last'
---
 NEWS.md|  1 +
 company.el | 10 ++
 2 files changed, 11 insertions(+)

diff --git a/NEWS.md b/NEWS.md
index e89cd59..b91d56a 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* New commands `company-select-first` and `company-select-last`.
 * `company-tng-mode` has been added to replace both
   `company-tng-configure-default` and the manual method of enabling
   `company-tng-frontend` (see also `company-tng-auto-configure`). Also,
diff --git a/company.el b/company.el
index 57cf960..1bffc7a 100644
--- a/company.el
+++ b/company.el
@@ -2098,6 +2098,16 @@ With ARG, move by that many elements."
 (company-abort)
 (company--unread-this-command-keys)))
 
+(defun company-select-first ()
+  "Select the first completion candidate."
+  (interactive)
+  (company-set-selection 0))
+
+(defun company-select-last ()
+  "Select the last completion candidate."
+  (interactive)
+  (company-set-selection (1- company-candidates-length)))
+
 (defun company-next-page ()
   "Select the candidate one page further."
   (interactive)



[elpa] externals/company 18b7b79 29/46: Fix company--face-attribute helper

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 18b7b79d579ac3a93920762742a1eaa35491592f
Author: Henrik Lissner 
Commit: Henrik Lissner 

Fix company--face-attribute helper

In three cases:

1. When FACE is remapped to a single face in face-remapping-alist.
2. When FACE remapped to a list of faces (and potentially contains a
   self-reference, which face-remap allows so faces can refer to their
   pre-remapped selves).
3. When FACE is a face spec, a missing argument would've caused a
   wrong-number-of-args error.

Fixes #1022
---
 company.el | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/company.el b/company.el
index b4e40c2..fb39fa8 100644
--- a/company.el
+++ b/company.el
@@ -2750,13 +2750,17 @@ If SHOW-VERSION is non-nil, show the version in the 
echo area."
   ;; Like `face-attribute', but accounts for faces that have been remapped to
   ;; another face, a list of faces, or a face spec.
   (cond ((symbolp face)
- (let ((remap (cadr (assq face face-remapping-alist
+ (let ((remap (cdr (assq face face-remapping-alist
(if remap
-   (company--face-attribute remap attr)
+   (company--face-attribute
+;; Faces can be remapped to their unremapped selves, but that
+;; would cause us infinite recursion.
+(if (listp remap) (remq face remap) remap)
+attr)
  (face-attribute face attr nil t
 ((keywordp (car-safe face))
  (or (plist-get face attr)
- (company--face-attribute (plist-get face :inherit
+ (company--face-attribute (plist-get face :inherit) attr)))
 ((listp face)
  (cl-find-if #'stringp
  (mapcar (lambda (f) (company--face-attribute f attr))



[elpa] externals/company 54f60ef 14/46: Print the right buffer-local value

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 54f60ef523878c4d332f29df380f36cf2f165935
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Print the right buffer-local value
---
 company.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/company.el b/company.el
index 6897c3c..a43eb32 100644
--- a/company.el
+++ b/company.el
@@ -2435,6 +2435,7 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
   thereis (let ((company-backend b))
 (setq backend b)
 (company-call-backend 'prefix
+ (c-a-p-f completion-at-point-functions)
  cc annotations)
 (when (or (stringp prefix) (consp prefix))
   (let ((company-backend backend))
@@ -2461,7 +2462,7 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
   (memq 'company-capf backend)
 (eq backend 'company-capf))
   (insert "Value of c-a-p-f: "
-  (pp-to-string completion-at-point-functions)))
+  (pp-to-string c-a-p-f)))
 (insert "Major mode: " mode)
 (insert "\n")
 (insert "Prefix: " (pp-to-string prefix))



[elpa] externals/company 13e2ada 39/46: Avoid calling executable-find for local buffers.

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 13e2adaaefee0867d9456d14ba4396364c77b5eb
Author: Jimmy Aguilar Mena 
Commit: Jimmy Aguilar Mena 

Avoid calling executable-find for local buffers.

* company-gtags.el (company-gtags-executable) : Restored to the original
value.
(company-gtags--executable-p) : Test if file is remote and emacs version
before calling executable-find again.
---
 company-gtags.el | 16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/company-gtags.el b/company-gtags.el
index ff84d29..164c7df 100644
--- a/company-gtags.el
+++ b/company-gtags.el
@@ -37,7 +37,8 @@
   'company-gtags-gnu-global-program-name
   'company-gtags-executable "earlier")
 
-(defcustom company-gtags-executable nil
+(defcustom company-gtags-executable
+  (executable-find "global")
   "Location of GNU global executable."
   :type 'string)
 
@@ -64,12 +65,13 @@ completion."
 
 (defun company-gtags--executable-p ()
   (cond
-   (company-gtags-executable)
-   ((eq company-gtags--executable 'unknown)
-(setq-local company-gtags--executable (if (version<= "27" emacs-version)
- (executable-find "global" t)
-   (executable-find "global"
-   (t company-gtags--executable)))
+   ((not (eq company-gtags--executable 'unknown)) ;; the value is already 
cached
+company-gtags--executable)
+   ((and (version<= "27" emacs-version)   ;; can search remotely to set
+ (file-remote-p default-directory))
+(setq-local company-gtags--executable (executable-find "global" t)))
+   (t ;; use default value (searched 
locally)
+(setq-local company-gtags--executable company-gtags-executable
 
 (defun company-gtags--fetch-tags (prefix)
   "Call global executable "



[elpa] externals/company bbff400 27/46: Fix tooltip background stretching to EOL

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit bbff4007ac7d8e5dbc679f8e1f6a750d863ee861
Author: Henrik Lissner 
Commit: Henrik Lissner 

Fix tooltip background stretching to EOL

When default face has been remapped
---
 company.el | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/company.el b/company.el
index c6847b5..b4e40c2 100644
--- a/company.el
+++ b/company.el
@@ -2746,6 +2746,22 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
   (cl-decf ww (1- (length (aref buffer-display-table ?\n)
 ww))
 
+(defun company--face-attribute (face attr)
+  ;; Like `face-attribute', but accounts for faces that have been remapped to
+  ;; another face, a list of faces, or a face spec.
+  (cond ((symbolp face)
+ (let ((remap (cadr (assq face face-remapping-alist
+   (if remap
+   (company--face-attribute remap attr)
+ (face-attribute face attr nil t
+((keywordp (car-safe face))
+ (or (plist-get face attr)
+ (company--face-attribute (plist-get face :inherit
+((listp face)
+ (cl-find-if #'stringp
+ (mapcar (lambda (f) (company--face-attribute f attr))
+ face)
+
 (defun company--replacement-string (lines old column nl &optional align-top)
   (cl-decf column company-tooltip-margin)
 
@@ -2782,7 +2798,7 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
 (let* ((nl-face (list
  :extend t
  :inverse-video nil
- :background (face-attribute 'default :background)))
+ :background (company--face-attribute 'default 
:background)))
(str (apply #'concat
(when nl " \n")
(cl-mapcan



[elpa] externals/company 8c22b58 28/46: Merge pull request #1020 from hlissner/fix-tooltip-bg

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 8c22b58a01ba5f571bff112fadfc51046473fcc1
Merge: 25f6a27 bbff400
Author: Dmitry Gutov 
Commit: GitHub 

Merge pull request #1020 from hlissner/fix-tooltip-bg

Fix tooltip background stretching to EOL
---
 company.el | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/company.el b/company.el
index c6847b5..b4e40c2 100644
--- a/company.el
+++ b/company.el
@@ -2746,6 +2746,22 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
   (cl-decf ww (1- (length (aref buffer-display-table ?\n)
 ww))
 
+(defun company--face-attribute (face attr)
+  ;; Like `face-attribute', but accounts for faces that have been remapped to
+  ;; another face, a list of faces, or a face spec.
+  (cond ((symbolp face)
+ (let ((remap (cadr (assq face face-remapping-alist
+   (if remap
+   (company--face-attribute remap attr)
+ (face-attribute face attr nil t
+((keywordp (car-safe face))
+ (or (plist-get face attr)
+ (company--face-attribute (plist-get face :inherit
+((listp face)
+ (cl-find-if #'stringp
+ (mapcar (lambda (f) (company--face-attribute f attr))
+ face)
+
 (defun company--replacement-string (lines old column nl &optional align-top)
   (cl-decf column company-tooltip-margin)
 
@@ -2782,7 +2798,7 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
 (let* ((nl-face (list
  :extend t
  :inverse-video nil
- :background (face-attribute 'default :background)))
+ :background (company--face-attribute 'default 
:background)))
(str (apply #'concat
(when nl " \n")
(cl-mapcan



[elpa] externals/company 5f5949b 33/46: Merge pull request #1024 from hlissner/fix-face-helper

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 5f5949b6ae8ea9df94c6cb3e01d9cae43623b794
Merge: 053c50d b16b236
Author: Dmitry Gutov 
Commit: GitHub 

Merge pull request #1024 from hlissner/fix-face-helper

Fix company--face-attribute for text-scaled faces
---
 company.el | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/company.el b/company.el
index fb39fa8..09c2d46 100644
--- a/company.el
+++ b/company.el
@@ -2749,7 +2749,8 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
 (defun company--face-attribute (face attr)
   ;; Like `face-attribute', but accounts for faces that have been remapped to
   ;; another face, a list of faces, or a face spec.
-  (cond ((symbolp face)
+  (cond ((null face) nil)
+((symbolp face)
  (let ((remap (cdr (assq face face-remapping-alist
(if remap
(company--face-attribute
@@ -2802,7 +2803,8 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
 (let* ((nl-face (list
  :extend t
  :inverse-video nil
- :background (company--face-attribute 'default 
:background)))
+ :background (or (company--face-attribute 'default 
:background)
+ (face-attribute 'default :background nil 
t
(str (apply #'concat
(when nl " \n")
(cl-mapcan



[elpa] externals/company fb9db07 19/46: Merge pull request #999 from kiennq/bug/company-selection-default

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit fb9db076c9f968cdf32fc04af9c1abe410275267
Merge: d6df27f c1e8972
Author: Dmitry Gutov 
Commit: GitHub 

Merge pull request #999 from kiennq/bug/company-selection-default

company-selection: add company-selection-default to have better support for 
non-selection popup
---
 NEWS.md|   3 +
 company-tng.el | 125 -
 company.el | 225 ++---
 test/core-tests.el | 125 +
 4 files changed, 306 insertions(+), 172 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index d93c873..b51c457 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,9 @@
 
 ## Next
 
+* `company-tng-mode` has been added and replace the manual method of enabling
+  `company-tng-frontend`. Also, `company-selection` can have null value to
+  indicate no selection.
 * `company-auto-complete` and `company-auto-complete-chars` have been renamed 
to
   `company-auto-commit` and `company-auto-commit-chars` respectively.
 * `company-clang` filters out duplicates
diff --git a/company-tng.el b/company-tng.el
index 404d436..d0096c1 100644
--- a/company-tng.el
+++ b/company-tng.el
@@ -37,16 +37,12 @@
 ;; need to confirm the entry.
 ;;
 ;; Usage:
+;; Enable`company-tng-mode' with:
+;;   (add-hook 'company-mode-hook 'company-tng-mode)
 ;;
 ;; To apply the default configuration for company-tng call
 ;; `company-tng-configure-default' from your init script.
 ;;
-;; You can also configure company-tng manually:
-;;
-;; Add `company-tng-frontend' to `company-frontends':
-;;
-;;   (add-to-list 'company-frontends 'company-tng-frontend)
-;;
 ;; We recommend to bind TAB to `company-select-next', S-TAB to
 ;; `company-select-previous', and unbind RET and other now-unnecessary
 ;; keys from `company-active-map':
@@ -105,25 +101,22 @@ confirm the selection and finish the completion."
 (show
  (let ((ov (make-overlay (point) (point
(setq company-tng--overlay ov)
-   (overlay-put ov 'priority 2))
- (advice-add 'company-select-next :before-until 
'company-tng--allow-unselected)
- (advice-add 'company-fill-propertize :filter-args 
'company-tng--adjust-tooltip-highlight))
+   (overlay-put ov 'priority 2)))
 (update
- (let ((ov company-tng--overlay)
-   (selected (nth company-selection company-candidates))
-   (prefix (length company-prefix)))
+ (let* ((ov company-tng--overlay)
+(selected (and company-selection
+   (nth company-selection company-candidates)))
+(prefix (length company-prefix)))
(move-overlay ov (- (point) prefix) (point))
(overlay-put ov
 (if (= prefix 0) 'after-string 'display)
-(and company-selection-changed selected
+selected)))
 (hide
  (when company-tng--overlay
(delete-overlay company-tng--overlay)
-   (kill-local-variable 'company-tng--overlay))
- (advice-remove 'company-select-next 'company-tng--allow-unselected)
- (advice-remove 'company-fill-propertize 
'company-tng--adjust-tooltip-highlight))
+   (kill-local-variable 'company-tng--overlay)))
 (pre-command
- (when (and company-selection-changed
+ (when (and company-selection
 (not (company--company-command-p (this-command-keys
(company--unread-this-command-keys)
(setq this-command 'company-complete-selection)
@@ -133,65 +126,49 @@ confirm the selection and finish the completion."
 (defvar company-rtags-insert-arguments)
 (defvar lsp-enable-snippet)
 
+(defgroup company-tng nil
+  "Company Tab and Go."
+  :group 'company)
+
+(defcustom company-tng-auto-configure t
+  "Automatically apply default configure when enable `company-tng-mode'."
+  :type 'boolean)
+
+;;;###autoload
+(define-obsolete-function-alias 'company-tng-configure-default 
'company-tng-mode "0.9.14"
+  "Applies the default configuration to enable company-tng.")
+
 ;;;###autoload
-(defun company-tng-configure-default ()
-  "Applies the default configuration to enable company-tng."
-  (setq company-require-match nil)
-  (setq company-frontends '(company-tng-frontend
-company-pseudo-tooltip-frontend
-company-echo-metadata-frontend))
-  (setq company-clang-insert-arguments nil
-company-semantic-insert-arguments nil
-company-rtags-insert-arguments nil
-lsp-enable-snippet nil)
-  (advice-add #'eglot--snippet-expansion-fn :override #'ignore)
-  (let ((keymap company-active-map))
-(define-key keymap [return] nil)
-(define-key keymap (kbd "RET") nil)
-(define-key keymap [tab] 'company-select-next)
-(define-key keymap (kbd "TAB") 'company-select-next)
-(define-key keymap [backtab] 'company-select-previous)
-(define-key keymap (kbd "S-TAB") 'company-select-previous)))
-
-(defun company-tng--allow-unselected (&optional arg

[elpa] externals/company bea3195 36/46: Implement `company-select-first' and `company-select-last'

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit bea319537433dac3d053d5452f89b654eb34d8ad
Author: David Florness 
Commit: David Florness 

Implement `company-select-first' and `company-select-last'
---
 NEWS.md|  1 +
 company.el | 10 ++
 2 files changed, 11 insertions(+)

diff --git a/NEWS.md b/NEWS.md
index e89cd59..b91d56a 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* New commands `company-select-first` and `company-select-last`.
 * `company-tng-mode` has been added to replace both
   `company-tng-configure-default` and the manual method of enabling
   `company-tng-frontend` (see also `company-tng-auto-configure`). Also,
diff --git a/company.el b/company.el
index 57cf960..1bffc7a 100644
--- a/company.el
+++ b/company.el
@@ -2098,6 +2098,16 @@ With ARG, move by that many elements."
 (company-abort)
 (company--unread-this-command-keys)))
 
+(defun company-select-first ()
+  "Select the first completion candidate."
+  (interactive)
+  (company-set-selection 0))
+
+(defun company-select-last ()
+  "Select the last completion candidate."
+  (interactive)
+  (company-set-selection (1- company-candidates-length)))
+
 (defun company-next-page ()
   "Select the candidate one page further."
   (interactive)



[elpa] externals/company c4d205a 31/46: Fix company--face-attribute for text-scaled faces

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit c4d205a5088201718f14d2e92ae6af4efaba6355
Author: Henrik Lissner 
Commit: Henrik Lissner 

Fix company--face-attribute for text-scaled faces

Fixes the case where some remaps (like what text-scale does) use a
face-spec without an :inherit property, causing an "invalid face" error.
---
 company.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/company.el b/company.el
index fb39fa8..74d6b6b 100644
--- a/company.el
+++ b/company.el
@@ -2749,7 +2749,8 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
 (defun company--face-attribute (face attr)
   ;; Like `face-attribute', but accounts for faces that have been remapped to
   ;; another face, a list of faces, or a face spec.
-  (cond ((symbolp face)
+  (cond ((null face) nil)
+((symbolp face)
  (let ((remap (cdr (assq face face-remapping-alist
(if remap
(company--face-attribute



[elpa] externals/company dccd04b 44/46: company-gtags--fetch-tags: Revert an earlier change

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit dccd04b7fb658d366c2081b6ce7ddcd208ce7ae0
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

company-gtags--fetch-tags: Revert an earlier change

Just to simplify, #1038.
---
 company-gtags.el | 48 +++-
 1 file changed, 23 insertions(+), 25 deletions(-)

diff --git a/company-gtags.el b/company-gtags.el
index 06a303b..daf067f 100644
--- a/company-gtags.el
+++ b/company-gtags.el
@@ -89,31 +89,29 @@ completion."
 company-gtags-executable)))
 
 (defun company-gtags--fetch-tags (prefix)
-  "Call global executable "
-  (let ((caller-buffer (current-buffer)))
-(with-temp-buffer
-  (let ((temp-buffer (current-buffer)))
-(when (with-current-buffer caller-buffer
-;; Execute the command in the local buffer but output in the 
temporal one.
-(/= 3 (process-file (company-gtags--executable) nil
-;; "-T" goes through all the tag files 
listed in GTAGSLIBPATH
-temp-buffer nil "-xGqT" (concat "^" 
prefix
-  (goto-char (point-min))
-  (cl-loop while
-   (re-search-forward (concat
-   "^"
-   "\\([^ ]*\\)" ;; completion
-   "[ \t]+\\([[:digit:]]+\\)" ;; linum
-   "[ \t]+\\([^ \t]+\\)" ;; file
-   "[ \t]+\\(.*\\)" ;; definition
-   "$"
-   ) nil t)
-   collect
-   (propertize (match-string 1)
-   'meta (match-string 4)
-   'location (cons (expand-file-name (match-string 
3))
-   (string-to-number (match-string 
2)))
-   )))
+  (with-temp-buffer
+(let (tags)
+  ;; For some reason Global v 6.6.3 is prone to returning exit status 1
+  ;; even on successful searches when '-T' is used.
+  (when (/= 3 (process-file company-gtags-executable nil
+   ;; "-T" goes through all the tag files listed 
in GTAGSLIBPATH
+   (list (current-buffer) nil) nil "-xGqT" (concat 
"^" prefix)))
+(goto-char (point-min))
+(cl-loop while
+ (re-search-forward (concat
+ "^"
+ "\\([^ ]*\\)" ;; completion
+ "[ \t]+\\([[:digit:]]+\\)" ;; linum
+ "[ \t]+\\([^ \t]+\\)" ;; file
+ "[ \t]+\\(.*\\)" ;; definition
+ "$"
+ ) nil t)
+ collect
+ (propertize (match-string 1)
+ 'meta (match-string 4)
+ 'location (cons (expand-file-name (match-string 
3))
+ (string-to-number (match-string 
2)))
+ ))
 
 (defun company-gtags--annotation (arg)
   (let ((meta (get-text-property 0 'meta arg)))



[elpa] externals/company dd92593 35/46: Merge pull request #1032 from kiennq/bug/company-selection-offset

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit dd925936f7c0bf00319c81e8caea1b3db63bb8b5
Merge: 5f5949b 7c25cf4
Author: Dmitry Gutov 
Commit: GitHub 

Merge pull request #1032 from kiennq/bug/company-selection-offset

company-set-selection: adding offset internally instead of via caller
---
 company.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/company.el b/company.el
index 09c2d46..57cf960 100644
--- a/company.el
+++ b/company.el
@@ -1203,6 +1203,7 @@ update if FORCE-UPDATE."
 (let* ((offset (if company-selection-default 0 1))
(company-candidates-length
 (+ company-candidates-length offset)))
+  (setq selection (+ selection offset))
   (setq selection
 (if company-selection-wrap-around
 (mod selection company-candidates-length)
@@ -2065,8 +2066,7 @@ meant for no selection."
 (let ((selection (+ (or arg 1)
 (or company-selection
 company-selection-default
--1)
-(if company-selection-default 0 1
+-1
   (company-set-selection selection
 
 (defun company-select-previous (&optional arg)



[elpa] externals/company 569ff3e 20/46: Copy edits

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 569ff3e7eb7452c6aca98fa83f8256c7013a987e
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Copy edits
---
 company-tng.el | 17 +++--
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/company-tng.el b/company-tng.el
index d0096c1..f492f26 100644
--- a/company-tng.el
+++ b/company-tng.el
@@ -37,11 +37,16 @@
 ;; need to confirm the entry.
 ;;
 ;; Usage:
-;; Enable`company-tng-mode' with:
-;;   (add-hook 'company-mode-hook 'company-tng-mode)
 ;;
-;; To apply the default configuration for company-tng call
-;; `company-tng-configure-default' from your init script.
+;; Enable `company-tng-mode' with:
+;;
+;;   (add-hook 'after-init-hook 'company-tng-mode)
+;;
+;; in your init script. It will set up the required frontend, as well as make a
+;; number of recommended configuration changes described below.
+;;
+;; To avoid these changes, if you want to tweak everything yourself, customize
+;;`company-tng-auto-configure' to nil.
 ;;
 ;; We recommend to bind TAB to `company-select-next', S-TAB to
 ;; `company-select-previous', and unbind RET and other now-unnecessary
@@ -70,8 +75,8 @@
 ;; continues typing would be surprising and undesirable, since the candidate 
was
 ;; already inserted into the buffer.
 ;;
-;; For this reason `company-tng-configure-default' disables arguments insertion
-;; for a number of popular backends.  If the backend you are using is not among
+;; For this reason `company-tng-mode' by default disables arguments insertion
+;; for a number of popular backends. If the backend you are using is not among
 ;; them, you might have to configure it not to do that yourself.
 ;;
 ;; YASnippet and company-tng both use TAB, which causes conflicts. The



[elpa] externals/company c1e8972 18/46: company-selection: add company-selection-default to have better support for non-selection popup

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit c1e8972950c20c80d4818adcc44f8a91d8f9d82a
Author: Kien Nguyen 
Commit: Kien Nguyen 

company-selection: add company-selection-default to have better support for 
non-selection popup
---
 NEWS.md|   3 +
 company-tng.el | 125 -
 company.el | 225 ++---
 test/core-tests.el | 125 +
 4 files changed, 306 insertions(+), 172 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index d93c873..b51c457 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,9 @@
 
 ## Next
 
+* `company-tng-mode` has been added and replace the manual method of enabling
+  `company-tng-frontend`. Also, `company-selection` can have null value to
+  indicate no selection.
 * `company-auto-complete` and `company-auto-complete-chars` have been renamed 
to
   `company-auto-commit` and `company-auto-commit-chars` respectively.
 * `company-clang` filters out duplicates
diff --git a/company-tng.el b/company-tng.el
index 404d436..d0096c1 100644
--- a/company-tng.el
+++ b/company-tng.el
@@ -37,16 +37,12 @@
 ;; need to confirm the entry.
 ;;
 ;; Usage:
+;; Enable`company-tng-mode' with:
+;;   (add-hook 'company-mode-hook 'company-tng-mode)
 ;;
 ;; To apply the default configuration for company-tng call
 ;; `company-tng-configure-default' from your init script.
 ;;
-;; You can also configure company-tng manually:
-;;
-;; Add `company-tng-frontend' to `company-frontends':
-;;
-;;   (add-to-list 'company-frontends 'company-tng-frontend)
-;;
 ;; We recommend to bind TAB to `company-select-next', S-TAB to
 ;; `company-select-previous', and unbind RET and other now-unnecessary
 ;; keys from `company-active-map':
@@ -105,25 +101,22 @@ confirm the selection and finish the completion."
 (show
  (let ((ov (make-overlay (point) (point
(setq company-tng--overlay ov)
-   (overlay-put ov 'priority 2))
- (advice-add 'company-select-next :before-until 
'company-tng--allow-unselected)
- (advice-add 'company-fill-propertize :filter-args 
'company-tng--adjust-tooltip-highlight))
+   (overlay-put ov 'priority 2)))
 (update
- (let ((ov company-tng--overlay)
-   (selected (nth company-selection company-candidates))
-   (prefix (length company-prefix)))
+ (let* ((ov company-tng--overlay)
+(selected (and company-selection
+   (nth company-selection company-candidates)))
+(prefix (length company-prefix)))
(move-overlay ov (- (point) prefix) (point))
(overlay-put ov
 (if (= prefix 0) 'after-string 'display)
-(and company-selection-changed selected
+selected)))
 (hide
  (when company-tng--overlay
(delete-overlay company-tng--overlay)
-   (kill-local-variable 'company-tng--overlay))
- (advice-remove 'company-select-next 'company-tng--allow-unselected)
- (advice-remove 'company-fill-propertize 
'company-tng--adjust-tooltip-highlight))
+   (kill-local-variable 'company-tng--overlay)))
 (pre-command
- (when (and company-selection-changed
+ (when (and company-selection
 (not (company--company-command-p (this-command-keys
(company--unread-this-command-keys)
(setq this-command 'company-complete-selection)
@@ -133,65 +126,49 @@ confirm the selection and finish the completion."
 (defvar company-rtags-insert-arguments)
 (defvar lsp-enable-snippet)
 
+(defgroup company-tng nil
+  "Company Tab and Go."
+  :group 'company)
+
+(defcustom company-tng-auto-configure t
+  "Automatically apply default configure when enable `company-tng-mode'."
+  :type 'boolean)
+
+;;;###autoload
+(define-obsolete-function-alias 'company-tng-configure-default 
'company-tng-mode "0.9.14"
+  "Applies the default configuration to enable company-tng.")
+
 ;;;###autoload
-(defun company-tng-configure-default ()
-  "Applies the default configuration to enable company-tng."
-  (setq company-require-match nil)
-  (setq company-frontends '(company-tng-frontend
-company-pseudo-tooltip-frontend
-company-echo-metadata-frontend))
-  (setq company-clang-insert-arguments nil
-company-semantic-insert-arguments nil
-company-rtags-insert-arguments nil
-lsp-enable-snippet nil)
-  (advice-add #'eglot--snippet-expansion-fn :override #'ignore)
-  (let ((keymap company-active-map))
-(define-key keymap [return] nil)
-(define-key keymap (kbd "RET") nil)
-(define-key keymap [tab] 'company-select-next)
-(define-key keymap (kbd "TAB") 'company-select-next)
-(define-key keymap [backtab] 'company-select-previous)
-(define-key keymap (kbd "S-TAB") 'company-select-previous)))
-
-(defun company-tng--allow-unselected (&optional arg)
-  "Advice `company-select-next' to allow for an 'unselected'
-state. Unselected means that 

[elpa] externals/company 0edc87d 23/46: Fix a couple of warnings

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 0edc87d423b83c707e6c708f421d96f4d198803d
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Fix a couple of warnings

Closes #1006
---
 company-tng.el   | 2 ++
 company-yasnippet.el | 1 +
 2 files changed, 3 insertions(+)

diff --git a/company-tng.el b/company-tng.el
index f492f26..31c0823 100644
--- a/company-tng.el
+++ b/company-tng.el
@@ -143,6 +143,8 @@ confirm the selection and finish the completion."
 (define-obsolete-function-alias 'company-tng-configure-default 
'company-tng-mode "0.9.14"
   "Applies the default configuration to enable company-tng.")
 
+(declare-function eglot--snippet-expansion-fn "eglot")
+
 ;;;###autoload
 (define-minor-mode company-tng-mode
  "This minor mode enables `company-tng-frontend'."
diff --git a/company-yasnippet.el b/company-yasnippet.el
index c2c2688..c846d6f 100644
--- a/company-yasnippet.el
+++ b/company-yasnippet.el
@@ -34,6 +34,7 @@
 (declare-function yas--template-content "yasnippet")
 (declare-function yas--template-expand-env "yasnippet")
 (declare-function yas--warning "yasnippet")
+(declare-function yas-minor-mode "yasnippet")
 
 (defvar company-yasnippet-annotation-fn
   (lambda (name)



[elpa] externals/company 3a27fd9 43/46: company-gtags--executable: Don't create local values unnecessarily

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 3a27fd960ac76a98c166c03be5145815f30ddd0b
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

company-gtags--executable: Don't create local values unnecessarily
---
 company-gtags.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/company-gtags.el b/company-gtags.el
index f298c67..06a303b 100644
--- a/company-gtags.el
+++ b/company-gtags.el
@@ -85,8 +85,8 @@ completion."
   `((company-gtags--executable-connection . 
,company-gtags--executable)))
 
  (connection-local-set-profiles `(:machine ,host) symvars)
-   (t ;; use default value (searched 
locally)
-(setq-local company-gtags--executable company-gtags-executable
+   (t ;; use default value (searched locally)
+company-gtags-executable)))
 
 (defun company-gtags--fetch-tags (prefix)
   "Call global executable "



[elpa] externals/company e6fa6c0 40/46: Add connection-local caching for gtags executable.

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit e6fa6c0c66d2c9575950183845f326cc6833438b
Author: Jimmy Aguilar Mena 
Commit: Jimmy Aguilar Mena 

Add connection-local caching for gtags executable.
---
 company-gtags.el | 17 -
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/company-gtags.el b/company-gtags.el
index 164c7df..86038a3 100644
--- a/company-gtags.el
+++ b/company-gtags.el
@@ -69,7 +69,22 @@ completion."
 company-gtags--executable)
((and (version<= "27" emacs-version)   ;; can search remotely to set
  (file-remote-p default-directory))
-(setq-local company-gtags--executable (executable-find "global" t)))
+
+(with-connection-local-variables
+ (if (boundp 'company-gtags--executable-connection)
+ (setq-local company-gtags--executable ;; use if defined as 
connection-local
+ company-gtags--executable-connection)
+
+   ;; Else search and set as connection local for next uses.
+   (setq-local company-gtags--executable (executable-find "global" t))
+   (let* ((host (file-remote-p default-directory 'host))
+  (symvars (intern (concat host "-vars" ;; profile name
+
+ (connection-local-set-profile-variables
+  symvars
+  `((company-gtags--executable-connection . 
,company-gtags--executable)))
+
+ (connection-local-set-profiles `(:machine ,host) symvars)
(t ;; use default value (searched 
locally)
 (setq-local company-gtags--executable company-gtags-executable
 



[elpa] externals/company 2de0d9a 21/46: More copy edits

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 2de0d9ad970038075a3eb6bb3b6f34bf4613bf74
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

More copy edits
---
 NEWS.md | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index b51c457..9b48ea4 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,9 +2,10 @@
 
 ## Next
 
-* `company-tng-mode` has been added and replace the manual method of enabling
-  `company-tng-frontend`. Also, `company-selection` can have null value to
-  indicate no selection.
+* `company-tng-mode` has been added to replace both
+  `company-tng-configure-default' and the manual method of enabling
+  `company-tng-frontend` (see also `company-tng-auto-configure`). Also,
+  `company-selection` can now have `nil` value, which means no selection.
 * `company-auto-complete` and `company-auto-complete-chars` have been renamed 
to
   `company-auto-commit` and `company-auto-commit-chars` respectively.
 * `company-clang` filters out duplicates



[elpa] externals/company d591282 25/46: Merge pull request #1009 from condy0919/cmake

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit d5912821e7798a51e15586cc75818c7c18c21b7d
Merge: 0edc87d 805637c
Author: Dmitry Gutov 
Commit: GitHub 

Merge pull request #1009 from condy0919/cmake

company-cmake: property completion candidates
---
 company-cmake.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/company-cmake.el b/company-cmake.el
index 1bfb20b..5a05c75 100644
--- a/company-cmake.el
+++ b/company-cmake.el
@@ -40,6 +40,7 @@
 (defvar company-cmake-executable-arguments
   '("--help-command-list"
 "--help-module-list"
+"--help-property-list"
 "--help-variable-list")
   "The arguments we pass to cmake, separately.
 They affect which types of symbols we get completion candidates for.")



[elpa] externals/company 7c25cf4 34/46: company-set-selection: adding offset internally instead of via caller

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 7c25cf4358ec98e2c9ec83d6a16475d7317960d3
Author: Kien Nguyen 
Commit: Kien Nguyen 

company-set-selection: adding offset internally instead of via caller
---
 company.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/company.el b/company.el
index 09c2d46..57cf960 100644
--- a/company.el
+++ b/company.el
@@ -1203,6 +1203,7 @@ update if FORCE-UPDATE."
 (let* ((offset (if company-selection-default 0 1))
(company-candidates-length
 (+ company-candidates-length offset)))
+  (setq selection (+ selection offset))
   (setq selection
 (if company-selection-wrap-around
 (mod selection company-candidates-length)
@@ -2065,8 +2066,7 @@ meant for no selection."
 (let ((selection (+ (or arg 1)
 (or company-selection
 company-selection-default
--1)
-(if company-selection-default 0 1
+-1
   (company-set-selection selection
 
 (defun company-select-previous (&optional arg)



[elpa] externals/company 3644a59 45/46: company-gtags--executable: Make sure to return the detected value

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 3644a595b4647367de42a8de485efa0aae0c0213
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

company-gtags--executable: Make sure to return the detected value

#1038
---
 company-gtags.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/company-gtags.el b/company-gtags.el
index daf067f..a2c2372 100644
--- a/company-gtags.el
+++ b/company-gtags.el
@@ -84,7 +84,8 @@ completion."
   symvars
   `((company-gtags--executable-connection . 
,company-gtags--executable)))
 
- (connection-local-set-profiles `(:machine ,host) symvars)
+ (connection-local-set-profiles `(:machine ,host) symvars))
+   company-gtags--executable)))
(t ;; use default value (searched locally)
 company-gtags-executable)))
 



[elpa] externals/company 01f5d10 38/46: Fix company-gtags to work with tramp and multiple locations.

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 01f5d101df3258d575591a65e7cb0974eec129cb
Author: Jimmy Aguilar Mena 
Commit: Jimmy Aguilar Mena 

Fix company-gtags to work with tramp and multiple locations.

* company-gtags.el (company-gtags-executable) : Now default to nil
because the search is made locally if not set.
(company-gtags--executable-p) : Function to search and cache the global
executable locally in the buffer.
(company-gtags--annotation) : Use the new function
company-gtags--executable-p instead of the custom variable
(company-gtags--fetch-tags) : Use the new function
company-gtags--executable-p but execute the process-file from the caller
buffer to have all the context. The output is written back to the
temporal buffer.
---
 company-gtags.el | 63 +---
 1 file changed, 37 insertions(+), 26 deletions(-)

diff --git a/company-gtags.el b/company-gtags.el
index 598ba60..ff84d29 100644
--- a/company-gtags.el
+++ b/company-gtags.el
@@ -37,8 +37,7 @@
   'company-gtags-gnu-global-program-name
   'company-gtags-executable "earlier")
 
-(defcustom company-gtags-executable
-  (executable-find "global")
+(defcustom company-gtags-executable nil
   "Location of GNU global executable."
   :type 'string)
 
@@ -48,6 +47,7 @@
   :package-version '(company . "0.8.1"))
 
 (defvar-local company-gtags--tags-available-p 'unknown)
+(defvar-local company-gtags--executable 'unknown)
 
 (defcustom company-gtags-modes '(prog-mode jde-mode)
   "Modes that use `company-gtags'.
@@ -62,30 +62,41 @@ completion."
 (locate-dominating-file buffer-file-name "GTAGS"))
 company-gtags--tags-available-p))
 
+(defun company-gtags--executable-p ()
+  (cond
+   (company-gtags-executable)
+   ((eq company-gtags--executable 'unknown)
+(setq-local company-gtags--executable (if (version<= "27" emacs-version)
+ (executable-find "global" t)
+   (executable-find "global"
+   (t company-gtags--executable)))
+
 (defun company-gtags--fetch-tags (prefix)
-  (with-temp-buffer
-(let (tags)
-  ;; For some reason Global v 6.6.3 is prone to returning exit status 1
-  ;; even on successful searches when '-T' is used.
-  (when (/= 3 (process-file company-gtags-executable nil
-   ;; "-T" goes through all the tag files listed 
in GTAGSLIBPATH
-   (list (current-buffer) nil) nil "-xGqT" (concat 
"^" prefix)))
-(goto-char (point-min))
-(cl-loop while
- (re-search-forward (concat
- "^"
- "\\([^ ]*\\)" ;; completion
- "[ \t]+\\([[:digit:]]+\\)" ;; linum
- "[ \t]+\\([^ \t]+\\)" ;; file
- "[ \t]+\\(.*\\)" ;; definition
- "$"
- ) nil t)
- collect
- (propertize (match-string 1)
- 'meta (match-string 4)
- 'location (cons (expand-file-name (match-string 
3))
- (string-to-number (match-string 
2)))
- ))
+  "Call global executable "
+  (let ((caller-buffer (current-buffer)))
+(with-temp-buffer
+  (let ((temp-buffer (current-buffer)))
+(when (with-current-buffer caller-buffer
+;; Execute the command in the local buffer but output in the 
temporal one.
+(/= 3 (process-file (company-gtags--executable-p) nil
+;; "-T" goes through all the tag files 
listed in GTAGSLIBPATH
+temp-buffer nil "-xGqT" (concat "^" 
prefix
+  (goto-char (point-min))
+  (cl-loop while
+   (re-search-forward (concat
+   "^"
+   "\\([^ ]*\\)" ;; completion
+   "[ \t]+\\([[:digit:]]+\\)" ;; linum
+   "[ \t]+\\([^ \t]+\\)" ;; file
+   "[ \t]+\\(.*\\)" ;; definition
+   "$"
+   ) nil t)
+   collect
+   (propertize (match-string 1)
+   'meta (match-string 4)
+   'location (cons (expand-file-name (match-string 
3))
+   (string-to-number (match-string 
2)))
+   )))
 
 (defun company-gtags--annotation (arg)
   (let ((meta (get-text-property 0 'meta arg)))
@@ -98,7 +109,7 @@ completion."
   (interactive (list 'interactive))
   (cl-case command
  

[elpa] externals/company 123b604 46/46: Merge branch 'master' of https://github.com/company-mode/company-mode into externals/company

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 123b604297b64c69aeec3018722c75e03d18c23a
Merge: 24aefbd 3644a59
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Merge branch 'master' of https://github.com/company-mode/company-mode into 
externals/company
---
 .dir-locals.el  |   3 +-
 NEWS.md |  25 +++
 README.md   |   2 +-
 company-clang.el|  21 ++-
 company-cmake.el|   1 +
 company-eclim.el| 186 --
 company-gtags.el|  29 +++-
 company-tng.el  | 134 +++-
 company-xcode.el| 123 ---
 company-yasnippet.el|   1 +
 company.el  | 404 +---
 test/core-tests.el  | 145 +++--
 test/frontends-tests.el |   2 +-
 13 files changed, 515 insertions(+), 561 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
index 79d9a12..8e92085 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1,4 +1,5 @@
 ((nil . ((indent-tabs-mode . nil)
  (fill-column . 80)
  (sentence-end-double-space . t)
- (emacs-lisp-docstring-fill-column . 75
+ (emacs-lisp-docstring-fill-column . 75)
+ (project-vc-merge-submodules . nil
diff --git a/NEWS.md b/NEWS.md
index f1f1d05..38ef038 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,30 @@
 # History of user-visible changes
 
+## Next
+
+* `company-gtags` on remote hosts is improved
+  ([#1037](https://github.com/company-mode/company-mode/pull/1037)).
+* New commands `company-select-first` and `company-select-last`.
+* `company-tng-mode` has been added to replace both
+  `company-tng-configure-default` and the manual method of enabling
+  `company-tng-frontend` (see also `company-tng-auto-configure`). Also,
+  `company-selection` can now have `nil` value, which means no selection.
+* `company-auto-complete` and `company-auto-complete-chars` have been renamed 
to
+  `company-auto-commit` and `company-auto-commit-chars` respectively.
+* `company-clang` filters out duplicates
+  ([#841](https://github.com/company-mode/company-mode/issues/841)).
+* New user option `company-tooltip-width-grow-only`.
+* `company-xcode` has been removed. It has not been useful for years now.
+* `company-clang` has been moved to after `company-capf` in the default value 
of
+  `company-backends`. So now if there is an active completion function in
+  `completion-at-point-functions`, it will have priority over
+  `company-clang`. Unless it's `tags-completion-at-point-function` (this one is
+  still skipped explicitly).
+* `company-eclim` has been removed. Eclim is generally not recommended for 
Emacs
+  users these days, with
+  ([emacs-eclim](https://github.com/emacs-eclim/emacs-eclim/)) declared 
obsolete
+  in favor of `lsp-java`. Though it used its own backend anyway.
+
 ## 2020-07-26 (0.9.13)
 
 * `company-clang`: error handling is more permissive.
diff --git a/README.md b/README.md
index 1e0e5e6..b466d66 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
 See the [homepage](http://company-mode.github.com/).
 
 [![Build 
Status](https://travis-ci.org/company-mode/company-mode.png?branch=master)](https://travis-ci.org/company-mode/company-mode)
-[![Melpa 
Status](http://melpa.milkbox.net/packages/company-badge.svg)](http://melpa.milkbox.net/#/company)
+[![MELPA](https://melpa.org/packages/company-badge.svg)](https://melpa.org/#/company)
diff --git a/company-clang.el b/company-clang.el
index d7391b3..24e5977 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -136,6 +136,7 @@ or automatically through a custom 
`company-clang-prefix-guesser'."
   (let ((pattern (format company-clang--completion-pattern
  (regexp-quote prefix)))
 (case-fold-search nil)
+(results (make-hash-table :test 'equal :size (/ (point-max) 100)))
 lines match)
 (while (re-search-forward pattern nil t)
   (setq match (match-string-no-properties 1))
@@ -144,11 +145,21 @@ or automatically through a custom 
`company-clang-prefix-guesser'."
   (when (string-match ":" match)
 (setq match (substring match 0 (match-beginning 0)
 (let ((meta (match-string-no-properties 2)))
-  (when (and meta (not (string= match meta)))
-(put-text-property 0 1 'meta
-   (company-clang--strip-formatting meta)
-   match)))
-(push match lines)))
+  ;; Avoiding duplicates:
+  ;; https://github.com/company-mode/company-mode/issues/841
+  (cond
+   ;; Either meta != completion (not a macro)
+   ((not (equal match meta))
+(puthash match meta results))
+   ;; Or it's the first time we see this completion
+   ((eq (gethash match results 'none) 'none)
+(puthash match nil results))
+(maphash
+ (lambda (match meta)
+   (when meta
+ (put-text-property 0 1 'meta (company-clang--str

[elpa] externals/company 75acbc5 41/46: Merge pull request #1037 from Ergus/master

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 75acbc54a46c47a48a061064295cf304d94108a7
Merge: 97cfbc3 e6fa6c0
Author: Dmitry Gutov 
Commit: GitHub 

Merge pull request #1037 from Ergus/master

Fix company-gtags to work with tramp and multiple locations.
---
 company-gtags.el | 76 ++--
 1 file changed, 52 insertions(+), 24 deletions(-)

diff --git a/company-gtags.el b/company-gtags.el
index 598ba60..86038a3 100644
--- a/company-gtags.el
+++ b/company-gtags.el
@@ -48,6 +48,7 @@
   :package-version '(company . "0.8.1"))
 
 (defvar-local company-gtags--tags-available-p 'unknown)
+(defvar-local company-gtags--executable 'unknown)
 
 (defcustom company-gtags-modes '(prog-mode jde-mode)
   "Modes that use `company-gtags'.
@@ -62,30 +63,57 @@ completion."
 (locate-dominating-file buffer-file-name "GTAGS"))
 company-gtags--tags-available-p))
 
+(defun company-gtags--executable-p ()
+  (cond
+   ((not (eq company-gtags--executable 'unknown)) ;; the value is already 
cached
+company-gtags--executable)
+   ((and (version<= "27" emacs-version)   ;; can search remotely to set
+ (file-remote-p default-directory))
+
+(with-connection-local-variables
+ (if (boundp 'company-gtags--executable-connection)
+ (setq-local company-gtags--executable ;; use if defined as 
connection-local
+ company-gtags--executable-connection)
+
+   ;; Else search and set as connection local for next uses.
+   (setq-local company-gtags--executable (executable-find "global" t))
+   (let* ((host (file-remote-p default-directory 'host))
+  (symvars (intern (concat host "-vars" ;; profile name
+
+ (connection-local-set-profile-variables
+  symvars
+  `((company-gtags--executable-connection . 
,company-gtags--executable)))
+
+ (connection-local-set-profiles `(:machine ,host) symvars)
+   (t ;; use default value (searched 
locally)
+(setq-local company-gtags--executable company-gtags-executable
+
 (defun company-gtags--fetch-tags (prefix)
-  (with-temp-buffer
-(let (tags)
-  ;; For some reason Global v 6.6.3 is prone to returning exit status 1
-  ;; even on successful searches when '-T' is used.
-  (when (/= 3 (process-file company-gtags-executable nil
-   ;; "-T" goes through all the tag files listed 
in GTAGSLIBPATH
-   (list (current-buffer) nil) nil "-xGqT" (concat 
"^" prefix)))
-(goto-char (point-min))
-(cl-loop while
- (re-search-forward (concat
- "^"
- "\\([^ ]*\\)" ;; completion
- "[ \t]+\\([[:digit:]]+\\)" ;; linum
- "[ \t]+\\([^ \t]+\\)" ;; file
- "[ \t]+\\(.*\\)" ;; definition
- "$"
- ) nil t)
- collect
- (propertize (match-string 1)
- 'meta (match-string 4)
- 'location (cons (expand-file-name (match-string 
3))
- (string-to-number (match-string 
2)))
- ))
+  "Call global executable "
+  (let ((caller-buffer (current-buffer)))
+(with-temp-buffer
+  (let ((temp-buffer (current-buffer)))
+(when (with-current-buffer caller-buffer
+;; Execute the command in the local buffer but output in the 
temporal one.
+(/= 3 (process-file (company-gtags--executable-p) nil
+;; "-T" goes through all the tag files 
listed in GTAGSLIBPATH
+temp-buffer nil "-xGqT" (concat "^" 
prefix
+  (goto-char (point-min))
+  (cl-loop while
+   (re-search-forward (concat
+   "^"
+   "\\([^ ]*\\)" ;; completion
+   "[ \t]+\\([[:digit:]]+\\)" ;; linum
+   "[ \t]+\\([^ \t]+\\)" ;; file
+   "[ \t]+\\(.*\\)" ;; definition
+   "$"
+   ) nil t)
+   collect
+   (propertize (match-string 1)
+   'meta (match-string 4)
+   'location (cons (expand-file-name (match-string 
3))
+   (string-to-number (match-string 
2)))
+   )))
 
 (defun company-gtags--annotation (arg)
   (let ((meta (get-text-property 0 'meta arg)))
@@ -98,7 +126,7 @@ completion."
   (interactive (list 'interactive))
   

[elpa] externals/company b16b236 32/46: Fall back to unremapped 'default face :background

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit b16b236264af6170a2576d8427a5b28f4e19ae65
Author: Henrik Lissner 
Commit: Henrik Lissner 

Fall back to unremapped 'default face :background

Otherwise, if default is remapped to a list of faces we cannot extract a
:background from, then we still have a fallback.
---
 company.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/company.el b/company.el
index 74d6b6b..09c2d46 100644
--- a/company.el
+++ b/company.el
@@ -2803,7 +2803,8 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
 (let* ((nl-face (list
  :extend t
  :inverse-video nil
- :background (company--face-attribute 'default 
:background)))
+ :background (or (company--face-attribute 'default 
:background)
+ (face-attribute 'default :background nil 
t
(str (apply #'concat
(when nl " \n")
(cl-mapcan



[elpa] externals/company 053c50d 30/46: Merge pull request #1023 from hlissner/fix-face-helper

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 053c50d376e65e189a6b170d2fedc7d552a73907
Merge: 8c22b58 18b7b79
Author: Dmitry Gutov 
Commit: GitHub 

Merge pull request #1023 from hlissner/fix-face-helper

Fix company--face-attribute helper
---
 company.el | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/company.el b/company.el
index b4e40c2..fb39fa8 100644
--- a/company.el
+++ b/company.el
@@ -2750,13 +2750,17 @@ If SHOW-VERSION is non-nil, show the version in the 
echo area."
   ;; Like `face-attribute', but accounts for faces that have been remapped to
   ;; another face, a list of faces, or a face spec.
   (cond ((symbolp face)
- (let ((remap (cadr (assq face face-remapping-alist
+ (let ((remap (cdr (assq face face-remapping-alist
(if remap
-   (company--face-attribute remap attr)
+   (company--face-attribute
+;; Faces can be remapped to their unremapped selves, but that
+;; would cause us infinite recursion.
+(if (listp remap) (remq face remap) remap)
+attr)
  (face-attribute face attr nil t
 ((keywordp (car-safe face))
  (or (plist-get face attr)
- (company--face-attribute (plist-get face :inherit
+ (company--face-attribute (plist-get face :inherit) attr)))
 ((listp face)
  (cl-find-if #'stringp
  (mapcar (lambda (f) (company--face-attribute f attr))



[elpa] externals/company 056d19d 42/46: Rename a function and add NEWS entry

2020-12-30 Thread Dmitry Gutov
branch: externals/company
commit 056d19d54af1447f60f2329774e6c5abf98a91cb
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Rename a function and add NEWS entry
---
 NEWS.md  | 2 ++
 company-gtags.el | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index b91d56a..38ef038 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,8 @@
 
 ## Next
 
+* `company-gtags` on remote hosts is improved
+  ([#1037](https://github.com/company-mode/company-mode/pull/1037)).
 * New commands `company-select-first` and `company-select-last`.
 * `company-tng-mode` has been added to replace both
   `company-tng-configure-default` and the manual method of enabling
diff --git a/company-gtags.el b/company-gtags.el
index 86038a3..f298c67 100644
--- a/company-gtags.el
+++ b/company-gtags.el
@@ -63,7 +63,7 @@ completion."
 (locate-dominating-file buffer-file-name "GTAGS"))
 company-gtags--tags-available-p))
 
-(defun company-gtags--executable-p ()
+(defun company-gtags--executable ()
   (cond
((not (eq company-gtags--executable 'unknown)) ;; the value is already 
cached
 company-gtags--executable)
@@ -95,7 +95,7 @@ completion."
   (let ((temp-buffer (current-buffer)))
 (when (with-current-buffer caller-buffer
 ;; Execute the command in the local buffer but output in the 
temporal one.
-(/= 3 (process-file (company-gtags--executable-p) nil
+(/= 3 (process-file (company-gtags--executable) nil
 ;; "-T" goes through all the tag files 
listed in GTAGSLIBPATH
 temp-buffer nil "-xGqT" (concat "^" 
prefix
   (goto-char (point-min))
@@ -126,7 +126,7 @@ completion."
   (interactive (list 'interactive))
   (cl-case command
 (interactive (company-begin-backend 'company-gtags))
-(prefix (and (company-gtags--executable-p)
+(prefix (and (company-gtags--executable)
  buffer-file-name
  (apply #'derived-mode-p company-gtags-modes)
  (not (company-in-string-or-comment))