emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/company b21608a 1/4: Add keywords for make-mode


From: ELPA Syncer
Subject: [elpa] externals/company b21608a 1/4: Add keywords for make-mode
Date: Wed, 25 Aug 2021 11:57:06 -0400 (EDT)

branch: externals/company
commit b21608a856ae74f2fa9793cab4a177827276bccd
Author: Gong Qijian <gongqijian@gmail.com>
Commit: Gong Qijian <gongqijian@gmail.com>

    Add keywords for make-mode
---
 company-keywords.el | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/company-keywords.el b/company-keywords.el
index 0bb17ef..1b53533 100644
--- a/company-keywords.el
+++ b/company-keywords.el
@@ -297,6 +297,25 @@
     (enh-ruby-mode . ruby-mode))
   "Alist mapping major-modes to sorted keywords for `company-keywords'.")
 
+(with-eval-after-load 'make-mode
+  (require 'seq)
+  (mapc
+   (lambda (mode-stmnts)
+     (setf (alist-get (car mode-stmnts) company-keywords-alist)
+           (seq-uniq
+            (append
+             makefile-special-targets-list
+             (mapcan #'identity
+                     (mapcar #'split-string
+                             (seq-filter #'stringp
+                                         (symbol-value (cdr 
mode-stmnts)))))))))
+   '((makefile-automake-mode . makefile-automake-statements)
+     (makefile-gmake-mode    . makefile-gmake-statements)
+     (makefile-makepp-mode   . makefile-makepp-statements)
+     (makefile-bsdmake-mode  . makefile-bsdmake-statements)
+     (makefile-imake-mode    . makefile-statements)
+     (makefile-mode          . makefile-statements))))
+
 ;;;###autoload
 (defun company-keywords (command &optional arg &rest ignored)
   "`company-mode' backend for programming language keywords."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]