update packages

This commit is contained in:
2021-01-08 19:32:30 +01:00
parent ce8f24d28a
commit f5649dceab
467 changed files with 26642 additions and 22487 deletions

View File

@@ -17,7 +17,7 @@
;; 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 <http://www.gnu.org/licenses/>.
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
@@ -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)