[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 79d4b0d 10/66: company-cmake: Support G77/Fortran distinct
From: |
Dmitry Gutov |
Subject: |
[elpa] master 79d4b0d 10/66: company-cmake: Support G77/Fortran distinction |
Date: |
Tue, 13 Jan 2015 02:44:45 +0000 |
branch: master
commit 79d4b0d564236dda8ca7b31119938f8bb15dcaea
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
company-cmake: Support G77/Fortran distinction
#197
---
company-cmake.el | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/company-cmake.el b/company-cmake.el
index b38ece0..e2962f5 100644
--- a/company-cmake.el
+++ b/company-cmake.el
@@ -59,9 +59,14 @@ They affect which types of symbols we get completion
candidates for.")
(defun company-cmake--replace-tags (rlt)
(setq rlt (replace-regexp-in-string
- "\\(.*\\)<LANG>\\(.*\\)"
- (mapconcat 'identity '("\\1CXX\\2" "\\1C\\2" "\\1G77\\2") "\n")
- rlt))
+ "\\(.*?\\(IS_GNU\\)?\\)<LANG>\\(.*\\)"
+ (lambda (_match)
+ (mapconcat 'identity
+ (if (match-beginning 2)
+ '("\\1CXX\\3" "\\1C\\3" "\\1G77\\3")
+ '("\\1CXX\\3" "\\1C\\3" "\\1Fortran\\3"))
+ "\n"))
+ rlt t))
(setq rlt (replace-regexp-in-string
"\\(.*\\)<CONFIG>\\(.*\\)"
(mapconcat 'identity '("\\1DEBUG\\2" "\\1RELEASE\\2"
@@ -123,7 +128,7 @@ They affect which types of symbols we get completion
candidates for.")
(defun company-cmake--unexpand-candidate (candidate)
(cond
- ((string-match "^CMAKE_\\(C\\|CXX\\|G77\\)\\(_.*\\)$" candidate)
+ ((string-match "^CMAKE_\\(C\\|CXX\\|Fortran\\)\\(_.*\\)$" candidate)
(setq candidate (concat "CMAKE_<LANG>" (match-string 2 candidate))))
;; C flags
@@ -131,7 +136,7 @@ They affect which types of symbols we get completion
candidates for.")
(setq candidate (concat (match-string 1 candidate) "IS_GNU<LANG>")))
;; C flags
- ((string-match "^\\(.*_\\)OVERRIDE_\\(C\\|CXX\\|G77\\)$" candidate)
+ ((string-match "^\\(.*_\\)OVERRIDE_\\(C\\|CXX\\|Fortran\\)$" candidate)
(setq candidate (concat (match-string 1 candidate) "OVERRIDE_<LANG>")))
((string-match
"^\\(.*\\)\\(_DEBUG\\|_RELEASE\\|_RELWITHDEBINFO\\|_MINSIZEREL\\)\\(.*\\)$"
candidate)
- [elpa] master updated (0ead54c -> 092486e), Dmitry Gutov, 2015/01/12
- [elpa] master 6846466 01/66: company-capf: Distinguish between `finished' and `exact' in post-completion, Dmitry Gutov, 2015/01/12
- [elpa] master d4088c5 02/66: replace <LANG> <CONFIG> tag in variables, Dmitry Gutov, 2015/01/12
- [elpa] master 250f7af 04/66: s/Fortran/G77, Dmitry Gutov, 2015/01/12
- [elpa] master b6da724 03/66: Clean up a little, Dmitry Gutov, 2015/01/12
- [elpa] master 67ead1a 06/66: Bump the year, Dmitry Gutov, 2015/01/12
- [elpa] master eb03746 09/66: company-cmake--unexpand-candidate: Remove extra underscore, Dmitry Gutov, 2015/01/12
- [elpa] master 28f8dc6 11/66: Update NEWS, Dmitry Gutov, 2015/01/12
- [elpa] master e5627dd 12/66: company-etags-file-table: Check that TAGS is not a directory, Dmitry Gutov, 2015/01/12
- [elpa] master e66f2c3 13/66: company-bbdb: Use the whole line content after `: ' as prefix, Dmitry Gutov, 2015/01/12
- [elpa] master 79d4b0d 10/66: company-cmake: Support G77/Fortran distinction,
Dmitry Gutov <=
- [elpa] master 4375685 14/66: company-complete-number: Handle keypad events, Dmitry Gutov, 2015/01/12
- [elpa] master e692260 15/66: Show numbers in tooltip irrespective of scrolling, Dmitry Gutov, 2015/01/12
- [elpa] master c97666c 18/66: company-files--complete: Ignore case on appropriate systems, Dmitry Gutov, 2015/01/12
- [elpa] master 4d8ac8c 17/66: Support multiple-width chars in annotations, Dmitry Gutov, 2015/01/12
- [elpa] master ea5c4fd 05/66: More cleanup, Dmitry Gutov, 2015/01/12
- [elpa] master b188c49 07/66: Inline company-cmake--find-match, Dmitry Gutov, 2015/01/12
- [elpa] master 556ee69 16/66: Bump the version for development, Dmitry Gutov, 2015/01/12
- [elpa] master ccc08c9 08/66: Eliminate one `setq', Dmitry Gutov, 2015/01/12
- [elpa] master ed86ad5 20/66: company-update-candidates: Fix WRT ignore-case, Dmitry Gutov, 2015/01/12
- [elpa] master abf95f7 19/66: company-update-candidates: Don't be fooled by a few prefix completions, Dmitry Gutov, 2015/01/12