[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/cdlatex 64eb3570b5 39/49: Use define-minor-mode to define
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/cdlatex 64eb3570b5 39/49: Use define-minor-mode to define cdlatex-mode |
Date: |
Mon, 11 Jul 2022 02:58:34 -0400 (EDT) |
branch: elpa/cdlatex
commit 64eb3570b55a40e15729b5cad5cad78593e56701
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Use define-minor-mode to define cdlatex-mode
---
cdlatex.el | 27 ++++-----------------------
1 file changed, 4 insertions(+), 23 deletions(-)
diff --git a/cdlatex.el b/cdlatex.el
index f76c03c393..4f4d38387a 100644
--- a/cdlatex.el
+++ b/cdlatex.el
@@ -634,7 +634,7 @@ automatic help when idle for more than this amount of time."
(cdlatex-mode t))
;;;###autoload
-(defun cdlatex-mode (&optional arg)
+(define-minor-mode cdlatex-mode
"Minor mode for editing scientific LaTeX documents.
Here is a list of features: \\<cdlatex-mode-map>
@@ -688,29 +688,10 @@ displaying the available characters and their meanings.
Under X, many functions will be available also in a menu on the menu bar.
-
- (interactive "P")
- (setq cdlatex-mode (not (or (and (null arg) cdlatex-mode)
- (<= (prefix-numeric-value arg) 0))))
-
- ; Add or remove the menu, and run the hook
- (if cdlatex-mode
- (progn
- (easy-menu-add cdlatex-mode-menu)
- (run-hooks 'cdlatex-mode-hook)
- (cdlatex-compute-tables))
- (easy-menu-remove cdlatex-mode-menu)))
-
-(or (assoc 'cdlatex-mode minor-mode-alist)
- (setq minor-mode-alist
- (cons '(cdlatex-mode " CDL") minor-mode-alist)))
-
-(or (assoc 'cdlatex-mode minor-mode-map-alist)
- (setq minor-mode-map-alist
- (cons (cons 'cdlatex-mode cdlatex-mode-map)
- minor-mode-map-alist)))
-
Entering `cdlatex-mode' calls the hook cdlatex-mode-hook."
+ :lighter " CDL"
+ (when cdlatex-mode
+ (cdlatex-compute-tables)))
;;; ===========================================================================
;;;
- [nongnu] elpa/cdlatex 0eb638546c 37/49: Fix checkdoc issues, (continued)
- [nongnu] elpa/cdlatex 0eb638546c 37/49: Fix checkdoc issues, ELPA Syncer, 2022/07/11
- [nongnu] elpa/cdlatex d7bec27d31 42/49: Add .dir-locals.el to prevent whitespace issues, ELPA Syncer, 2022/07/11
- [nongnu] elpa/cdlatex ea52268926 47/49: * cdlatex.el: Fix typos and minor stylistic issues., ELPA Syncer, 2022/07/11
- [nongnu] elpa/cdlatex 4633ecf52d 11/49: modified README., ELPA Syncer, 2022/07/11
- [nongnu] elpa/cdlatex f36e5351f6 14/49: Fixed regex in cdlatex-tab to support \(...\), ELPA Syncer, 2022/07/11
- [nongnu] elpa/cdlatex b7183c2200 09/49: texmathp.el removed, ELPA Syncer, 2022/07/11
- [nongnu] elpa/cdlatex ef1145697d 20/49: Update README, ELPA Syncer, 2022/07/11
- [nongnu] elpa/cdlatex 2af5ee74d1 21/49: Add the AMSMATH split environment, ELPA Syncer, 2022/07/11
- [nongnu] elpa/cdlatex c456ce8d45 25/49: Bump version number, ELPA Syncer, 2022/07/11
- [nongnu] elpa/cdlatex 55299f20e8 38/49: Require auctex for texmathp, ELPA Syncer, 2022/07/11
- [nongnu] elpa/cdlatex 64eb3570b5 39/49: Use define-minor-mode to define cdlatex-mode,
ELPA Syncer <=
- [nongnu] elpa/cdlatex 3adedafd20 30/49: Add vars keeping cdlatex from taking over parens insert, ELPA Syncer, 2022/07/11
- [nongnu] elpa/cdlatex 614a8d94f6 32/49: Test commit, ELPA Syncer, 2022/07/11
- [nongnu] elpa/cdlatex f3eb992be1 40/49: Explicitly require reftex, ELPA Syncer, 2022/07/11
- [nongnu] elpa/cdlatex f03bcd7a89 43/49: Fix typos, ELPA Syncer, 2022/07/11
- [nongnu] elpa/cdlatex 4c392765e1 49/49: Merge branch 'minorfixes' of github.com:dr-scsi/cdlatex into minorfixes, ELPA Syncer, 2022/07/11