[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/cdlatex 64c1440441 05/13: No check for math environment ou
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/cdlatex 64c1440441 05/13: No check for math environment outside of latex buffers |
Date: |
Sat, 12 Aug 2023 12:59:19 -0400 (EDT) |
branch: elpa/cdlatex
commit 64c144044104db622de44effdc68fcb4f58714cb
Author: Carsten Dominik <dominik@Carstens-MacBook-Pro.local>
Commit: Carsten Dominik <dominik@Carstens-MacBook-Pro.local>
No check for math environment outside of latex buffers
For example, this will make the mode work well in org-mode files.
---
electricindex.el | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/electricindex.el b/electricindex.el
index 1b3e512030..51bae80c9e 100644
--- a/electricindex.el
+++ b/electricindex.el
@@ -94,12 +94,11 @@ Here is a list of features: \\<electricindex-mode-map>
Entering `electricindex-mode' calls the hook electricindex-mode-hook."
:lighter " EI")
-(defalias 'electricindex--texmathp
- (if (fboundp 'texmathp) #'texmathp
- ;; FIXME: Maybe we could do better, but why bother: the users who want it
- ;; can install AUCTeX. Tho maybe we should move texmathp into its
- ;; own package so it can be used even when AUCTeX is not
- ;; installed/activated.
+(defun electricindex-active-here ()
+ (if (eq major-mode 'latex-mode)
+ (if (fboundp 'texmathp)
+ (texmathp)
+ t)
t))
;;; ===========================================================================
@@ -108,7 +107,7 @@ Entering `electricindex-mode' calls the hook
electricindex-mode-hook."
(defun electricindex-digit ()
"Insert digit, maybe as an index to a quantity in math environment."
(interactive)
- (if (not (electricindex--texmathp))
+ (if (not (electricindex-active-here))
(self-insert-command 1)
(let ((digit (char-to-string (event-basic-type last-command-event))))
(if (looking-back "[a-zA-Z]" (1- (point)))
- [nongnu] elpa/cdlatex updated (a0153ef889 -> c13f089e96), ELPA Syncer, 2023/08/12
- [nongnu] elpa/cdlatex 25e8e65acc 04/13: First full and working implementation., ELPA Syncer, 2023/08/12
- [nongnu] elpa/cdlatex d97ba0a51d 03/13: Create the basic structure for the minor mode, ELPA Syncer, 2023/08/12
- [nongnu] elpa/cdlatex f6d5ad9dd6 02/13: Rename the new file to electricindex.el, ELPA Syncer, 2023/08/12
- [nongnu] elpa/cdlatex ccf8f878b2 01/13: Start a branch to implement electric indices, ELPA Syncer, 2023/08/12
- [nongnu] elpa/cdlatex 3c464be7b4 06/13: Fix whitespace handling at end of line, ELPA Syncer, 2023/08/12
- [nongnu] elpa/cdlatex 594eb697ef 08/13: Merge branch 'electricindex', ELPA Syncer, 2023/08/12
- [nongnu] elpa/cdlatex 84fe596341 09/13: Electricindex-mode now added to cdlatex., ELPA Syncer, 2023/08/12
- [nongnu] elpa/cdlatex 64c1440441 05/13: No check for math environment outside of latex buffers,
ELPA Syncer <=
- [nongnu] elpa/cdlatex 200ae37f70 07/13: Add mathring command, ELPA Syncer, 2023/08/12
- [nongnu] elpa/cdlatex b27b1bb79a 10/13: Integrate cdlatex-electricindex-mode, ELPA Syncer, 2023/08/12
- [nongnu] elpa/cdlatex 8b18d27cf6 11/13: add new file, ELPA Syncer, 2023/08/12
- [nongnu] elpa/cdlatex 5e50a66a78 12/13: Remove file, ELPA Syncer, 2023/08/12
- [nongnu] elpa/cdlatex c13f089e96 13/13: Release 4.17, with a bug fix, ELPA Syncer, 2023/08/12