[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 8e64cae 17/34: Untabify and add .dir-locals
From: |
Vitalie Spinu |
Subject: |
[elpa] master 8e64cae 17/34: Untabify and add .dir-locals |
Date: |
Tue, 7 May 2019 16:05:27 -0400 (EDT) |
branch: master
commit 8e64caef4dedddf13b06368c1413a2aff9e475a5
Author: Vitalie Spinu <address@hidden>
Commit: Vitalie Spinu <address@hidden>
Untabify and add .dir-locals
---
.dir-locals.el | 3 +++
company-math.el | 41 +++++++++++++++++++++++------------------
2 files changed, 26 insertions(+), 18 deletions(-)
diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000..064a938
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,3 @@
+
+((emacs-lisp-mode
+ (indent-tabs-mode)))
diff --git a/company-math.el b/company-math.el
index bf9d0e0..4b2b06a 100644
--- a/company-math.el
+++ b/company-math.el
@@ -52,7 +52,7 @@ When set to special value t, allow on all faces except those
in
`company-math-disallow-unicode-symbols-in-faces'."
:group 'company-math
:type '(choice (const t)
- (repeat :tag "Faces" symbol)))
+ (repeat :tag "Faces" symbol)))
(defcustom company-math-allow-latex-symbols-in-faces '(tex-math
font-latex-math-face)
"List of faces to disallow the insertion of latex mathematical symbols.
@@ -60,7 +60,7 @@ When set to special value t, allow on all faces except those
in
`company-math-disallow-latex-symbols-in-faces'."
:group 'company-math
:type '(choice (const t)
- (repeat :tag "Faces" symbol)))
+ (repeat :tag "Faces" symbol)))
(defcustom company-math-disallow-unicode-symbols-in-faces
'(font-latex-math-face)
"List of faces to disallow the insertion of Unicode symbols."
@@ -83,10 +83,10 @@ corresponding unicode symbol."
(delq nil
(mapcar
#'(lambda (el)
- (let* ((tex (substring (nth 1 el) 1))
- (ch (and (nth 2 el) (decode-char 'ucs (nth 2 el))))
- (symb (and ch (char-to-string ch))))
- (propertize tex :symbol symb)))
+ (let* ((tex (substring (nth 1 el) 1))
+ (ch (and (nth 2 el) (decode-char 'ucs (nth 2 el))))
+ (symb (and ch (char-to-string ch))))
+ (propertize tex :symbol symb)))
alist)))
(defconst company-math--symbols
@@ -97,19 +97,19 @@ corresponding unicode symbol."
(defun company-math--prefix (allow-faces disallow-faces)
(let* ((face (get-text-property (point) 'face))
- (face (or (car-safe face) face))
- (insertp (and (not (memq face disallow-faces))
- (or (eq t allow-faces)
- (memq face allow-faces)))))
+ (face (or (car-safe face) face))
+ (insertp (and (not (memq face disallow-faces))
+ (or (eq t allow-faces)
+ (memq face allow-faces)))))
(when insertp
(save-excursion
- (when (looking-back company-math-prefix-regexp (point-at-bol))
- (match-string 1))))))
+ (when (looking-back company-math-prefix-regexp (point-at-bol))
+ (match-string 1))))))
(defun company-math--substitute-unicode (symbol)
"Substitute preceding latex command with with SYMBOL."
(let ((pos (point))
- (inhibit-point-motion-hooks t))
+ (inhibit-point-motion-hooks t))
(when (re-search-backward company-math-prefix-regexp)
(delete-region (match-beginning 0) pos)
(insert symbol))))
@@ -124,7 +124,7 @@ corresponding unicode symbol."
(cl-case command
(interactive (company-begin-backend 'company-latex-commands))
(prefix (unless (company-in-string-or-comment)
- (company-math--prefix t '())))
+ (company-math--prefix t '())))
(candidates (all-completions arg math-symbol-list-latex-commands))
(sorted t)))
@@ -135,14 +135,19 @@ corresponding unicode symbol."
(cl-case command
(interactive (company-begin-backend 'company-math-symbols-latex))
(prefix (unless (company-in-string-or-comment)
- (company-math--prefix company-math-allow-latex-symbols-in-faces
-
company-math-disallow-latex-symbols-in-faces)))
+ (company-math--prefix company-math-allow-latex-symbols-in-faces
+
company-math-disallow-latex-symbols-in-faces)))
(annotation (concat " " (get-text-property 0 :symbol arg)))
(candidates (all-completions arg company-math--symbols))))
;;;###autoload
(defun company-math-symbols-unicode (command &optional arg &rest ignored)
- "Company backend for LaTeX mathematical symbols."
+ "Company backend for insertion of Unicode mathematical symbols.
+See the unicode-math page [1] for a list of fonts that have a
+good support for mathematical symbols.
+
+ [1]
http://ftp.snt.utwente.nl/pub/software/tex/help/Catalogue/entries/unicode-math.html
+"
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-math-symbols-unicode))
@@ -155,7 +160,7 @@ corresponding unicode symbol."
(concat candidate " "))
(all-completions arg company-math--symbols)))
(post-completion (company-math--substitute-unicode
- (get-text-property 0 :symbol arg)))))
+ (get-text-property 0 :symbol arg)))))
(provide 'company-math)
- [elpa] master updated (86df5e9 -> 26bf67b), Vitalie Spinu, 2019/05/07
- [elpa] master b83eb6d 04/34: Readme, Vitalie Spinu, 2019/05/07
- [elpa] master 389cebc 06/34: Looks back instead of re-search-backward, Vitalie Spinu, 2019/05/07
- [elpa] master 9c5fe4c 05/34: Readme, Vitalie Spinu, 2019/05/07
- [elpa] master c970a21 03/34: Adjust to `math-symbol-lists` name change, Vitalie Spinu, 2019/05/07
- [elpa] master 9a960df 02/34: Readme, Vitalie Spinu, 2019/05/07
- [elpa] master 7999062 01/34: Add initial stuff, Vitalie Spinu, 2019/05/07
- [elpa] master f5cedcf 12/34: Use generic `tex-mode-hook` in readme, Vitalie Spinu, 2019/05/07
- [elpa] master 8190924 07/34: [#1] Fix typo in readme, Vitalie Spinu, 2019/05/07
- [elpa] master e82c91d 10/34: Bump version, Vitalie Spinu, 2019/05/07
- [elpa] master 8e64cae 17/34: Untabify and add .dir-locals,
Vitalie Spinu <=
- [elpa] master 55f0a03 08/34: require cl-lib, Vitalie Spinu, 2019/05/07
- [elpa] master 9407824 21/34: Company doesn't like nils, remove those, Vitalie Spinu, 2019/05/07
- [elpa] master 96e55e6 20/34: [Fix #8] Don't propose Unicode completions if no Ucode, Vitalie Spinu, 2019/05/07
- [elpa] master 3c906cd 15/34: Always offer completions (workaround for company issue #476), Vitalie Spinu, 2019/05/07
- [elpa] master d0db15e 13/34: [Fix #6] Add `tex-math` to `company-math-allow-latex-symbols-in-faces`, Vitalie Spinu, 2019/05/07
- [elpa] master 26bf67b 34/34: [company-math] Merge from upstream, Vitalie Spinu, 2019/05/07
- [elpa] master a8a98e3 24/34: [Fix #11] Don't require at least one character in prefix regexp, Vitalie Spinu, 2019/05/07
- [elpa] master ce46d91 16/34: Merge pull request #7 from cpitclaudel/always-offer-completions, Vitalie Spinu, 2019/05/07
- [elpa] master 2cb03c4 23/34: Version 1.2, Vitalie Spinu, 2019/05/07
- [elpa] master 0263e9c 27/34: [Fix #12] Make default sub/super-script prefix __ and ^^, Vitalie Spinu, 2019/05/07