[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 994079d8cd 15/43: Delete ConTeXt-xx-mode experim
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 994079d8cd 15/43: Delete ConTeXt-xx-mode experimentally |
Date: |
Wed, 7 Feb 2024 06:07:10 -0500 (EST) |
branch: externals/auctex
commit 994079d8cddefbe6d641ab630213f442a66eaf74
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Delete ConTeXt-xx-mode experimentally
* context-en.el (ConTeXt-en-mode): Rename to ConTeXt--mode-en and
stop being major mode.
(context-en-mode): Delete alias.
* context-nl.el (ConTeXt-nl-mode): Rename to ConTeXt--mode-nl and
stop being major mode.
(context-nl-mode): Delete alias.
* context.el (ConTeXt-mode): Revert to a form similar to the one
before introducing `define-derived-mode'. Call ConTeXt--mode-xx
instead of ConTeXt-xx-mode.
(ConTeXt--auto-mode): Delete.
---
context-en.el | 21 +++++----------------
context-nl.el | 21 +++++----------------
context.el | 23 ++++-------------------
3 files changed, 14 insertions(+), 51 deletions(-)
diff --git a/context-en.el b/context-en.el
index 26f8456482..c63a4fd1d4 100644
--- a/context-en.el
+++ b/context-en.el
@@ -200,29 +200,18 @@ That is, besides the section(-block) commands.")
'("sub" ConTeXt-arg-define-ref (TeX-arg-literal " "))
'("sym" (TeX-arg-string "Symbol") (TeX-arg-literal " "))))
-;;;###autoload
-(define-derived-mode ConTeXt-en-mode ConTeXt-mode "ConTeXt-en"
- "Major mode for editing files for ConTeXt using its english interface.
-
-Entering `ConTeXt-mode' calls the value of `text-mode-hook',
-then the value of `TeX-mode-hook', and then the value
-of `ConTeXt-mode-hook'.
-
-Don't use `ConTeXt-en-mode-hook' and `ConTeXt-en-mode-map', both
-specific to this mode. They are ignored unless `ConTeXt-en-mode'
-is called directly."
- :syntax-table nil
- :abbrev-table nil
+(defun ConTeXt--mode-en ()
+ "Set up ConTeXt mode for editing files under english interface.
+Helper function of `ConTeXt-mode'. Don't use."
;; set the ConTeXt interface
(setq ConTeXt-current-interface "en")
;; initialization
(ConTeXt-mode-common-initialization)
- (ConTeXt-en-mode-initialization))
+ (ConTeXt-en-mode-initialization)
-;;;###autoload
-(defalias 'context-en-mode #'ConTeXt-en-mode)
+ (setq mode-name "ConTeXt-en"))
(provide 'context-en)
diff --git a/context-nl.el b/context-nl.el
index dfbcc3ac55..721b127f61 100644
--- a/context-nl.el
+++ b/context-nl.el
@@ -178,29 +178,18 @@ That is, besides the section(-block) commands.")
'("sub" ConTeXt-arg-define-ref (TeX-arg-literal " "))
'("sym" (TeX-arg-string "Symbol") (TeX-arg-literal " "))))
-;;;###autoload
-(define-derived-mode ConTeXt-nl-mode ConTeXt-mode "ConTeXt-nl"
- "Major mode for editing files for ConTeXt using its dutch interface.
-
-Entering `ConTeXt-mode' calls the value of `text-mode-hook',
-then the value of `TeX-mode-hook', and then the value
-of `ConTeXt-mode-hook'.
-
-Don't use `ConTeXt-nl-mode-hook' and `ConTeXt-nl-mode-map', both
-specific to this mode. They are ignored unless `ConTeXt-nl-mode'
-is called directly."
- :syntax-table nil
- :abbrev-table nil
+(defun ConTeXt--mode-nl ()
+ "Set up ConTeXt mode for editing files under dutch interface.
+Helper function of `ConTeXt-mode'. Don't use."
;; set the ConTeXt interface
(setq ConTeXt-current-interface "nl")
;; initialization
(ConTeXt-mode-common-initialization)
- (ConTeXt-nl-mode-initialization))
+ (ConTeXt-nl-mode-initialization)
-;;;###autoload
-(defalias 'context-nl-mode #'ConTeXt-nl-mode)
+ (setq mode-name "ConTeXt-nl"))
(provide 'context-nl)
diff --git a/context.el b/context.el
index 5774ac9340..1c5ac8ef5d 100644
--- a/context.el
+++ b/context.el
@@ -1919,25 +1919,10 @@ that is, you do _not_ have to cater for this yourself
by adding \\\\\\=' or $."
Entering `ConTeXt-mode' calls the value of `text-mode-hook',
then the value of `TeX-mode-hook', and then the value
of `ConTeXt-mode-hook'."
- ;; When called as parent of ConTeXt-{en,nl}-mode, do nothing to
- ;; avoid `TeX-add-symbols' and `ConTeXt-add-environments' for wrong
- ;; language interface.
- (add-hook 'change-major-mode-after-body-hook #'ConTeXt--auto-mode nil t))
-
-(defun ConTeXt--auto-mode ()
- ;; When called as not parent of ConTeXt-{en,nl}-mode, guess ConTeXt
- ;; interface and use it.
- (remove-hook 'change-major-mode-after-body-hook #'ConTeXt--auto-mode t)
- (when (string-equal mode-name "ConTeXt")
- (context-guess-current-interface)
- (ConTeXt-mode-common-initialization)
- (require (intern (concat "context-" ConTeXt-current-interface)))
- ;; This bypasses call to ConTeXt-{en,nl}-mode. Consequently,
- ;; their mode-specific hook/keymap are ignored.
- (funcall (intern (concat "ConTeXt-" ConTeXt-current-interface
"-mode-initialization")))
-
- (setq mode-name
- (concat "ConTeXt-" ConTeXt-current-interface)))
+ (context-guess-current-interface)
+ (require (intern (concat "context-" ConTeXt-current-interface)))
+ (funcall (intern (concat "ConTeXt--mode-" ConTeXt-current-interface)))
+
;; set mode line
(setq TeX-base-mode-name mode-name))
- [elpa] externals/auctex ab8f73a1cc 10/43: Merge branch 'master' into feature/fix-mode-names-overlap, (continued)
- [elpa] externals/auctex ab8f73a1cc 10/43: Merge branch 'master' into feature/fix-mode-names-overlap, Tassilo Horn, 2024/02/07
- [elpa] externals/auctex 15418dc957 34/43: ; * doc/changes.texi: Reshape the new entries., Tassilo Horn, 2024/02/07
- [elpa] externals/auctex 46f2f2215d 07/43: Inherit abbrevs saved in table with former mode name, Tassilo Horn, 2024/02/07
- [elpa] externals/auctex ebc69e7ae7 14/43: Canonicalize mode names, Tassilo Horn, 2024/02/07
- [elpa] externals/auctex 561a08e1cf 43/43: Require emacs 27.1, Tassilo Horn, 2024/02/07
- [elpa] externals/auctex ebd04735e7 16/43: Merge branch 'master' into feature/fix-mode-names-overlap, Tassilo Horn, 2024/02/07
- [elpa] externals/auctex 142f28b539 24/43: Update documents, Tassilo Horn, 2024/02/07
- [elpa] externals/auctex 96cad45213 31/43: ; Use `defvar-local', Tassilo Horn, 2024/02/07
- [elpa] externals/auctex ef86afdac5 06/43: Commit for initialization codes, Tassilo Horn, 2024/02/07
- [elpa] externals/auctex f41fbc0eac 18/43: Improve mode cleanup functions, Tassilo Horn, 2024/02/07
- [elpa] externals/auctex 994079d8cd 15/43: Delete ConTeXt-xx-mode experimentally,
Tassilo Horn <=
- [elpa] externals/auctex 48cc506998 33/43: Merge branch 'feature/fix-mode-names-overlap', Tassilo Horn, 2024/02/07
- [elpa] externals/auctex 94127f5e10 37/43: Make banner regexp customizable, Tassilo Horn, 2024/02/07
- [elpa] externals/auctex 5bd8ca03ff 13/43: ; * tex-jp.el (japanese-plain-TeX-mode): Fix mode lighter., Tassilo Horn, 2024/02/07
- [elpa] externals/auctex d7f1d28159 32/43: ; * tex.el (TeX-auto-parse-length): Fix Typo., Tassilo Horn, 2024/02/07
- [elpa] externals/auctex f9fc9619a1 35/43: ; Replace keyword wp with text, Tassilo Horn, 2024/02/07
- [elpa] externals/auctex 5b61f6c563 42/43: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2024/02/07
- [elpa] externals/auctex 997bff87d2 23/43: Retain compatibility for directory local variables, Tassilo Horn, 2024/02/07
- [elpa] externals/auctex ba27accea2 41/43: ; * doc/auctex.texi (Environments): Mention prefix argument., Tassilo Horn, 2024/02/07
- [elpa] externals/auctex ae43b62283 03/43: Commit for ConTeXt modes, Tassilo Horn, 2024/02/07
- [elpa] externals/auctex 5b50b1e2da 29/43: Set the safe-local-variable property with the :safe keyword, Tassilo Horn, 2024/02/07