[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e4c48a5a: Improve tex-jp.el politeness
From: |
Ikumi Keita |
Subject: |
master e4c48a5a: Improve tex-jp.el politeness |
Date: |
Sun, 27 Aug 2023 04:32:30 -0400 (EDT) |
branch: master
commit e4c48a5a021254d6914a4c7aadbee93320b7f8fc
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Improve tex-jp.el politeness
* tex-jp.el (japanese-latex-mode-initialization): Override
`LaTeX-default-style' only locally.
(japanese-TeX-insert-punctuation): Don't overwrite
`TeX-insert-punctuation'. Use :override advice instead.
(): Update copyright year.
---
tex-jp.el | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/tex-jp.el b/tex-jp.el
index 9220dd0f..8437ae70 100644
--- a/tex-jp.el
+++ b/tex-jp.el
@@ -1,6 +1,6 @@
;;; tex-jp.el --- Support for Japanese TeX. -*- lexical-binding: t; -*-
-;; Copyright (C) 1999, 2001-2008, 2012-2013, 2016-2018, 2020-2022
+;; Copyright (C) 1999, 2001-2008, 2012-2013, 2016-2018, 2020-2023
;; Free Software Foundation, Inc.
;; Author: KOBAYASHI Shinji <koba@flab.fujitsu.co.jp>,
@@ -449,7 +449,7 @@ Set `japanese-TeX-mode' to t, and enter `TeX-latex-mode'."
;; に 2 回行われてしまう。
(add-hook 'TeX-update-style-hook
#'japanese-LaTeX-guess-engine nil t)
- (setq LaTeX-default-style japanese-LaTeX-default-style)
+ (setq-local LaTeX-default-style japanese-LaTeX-default-style)
(when (and (fboundp 'font-latex-add-keywords)
(eq TeX-install-font-lock 'font-latex-setup))
@@ -517,6 +517,9 @@ overwrite the value already set locally."
;;; Support for various self-insert-command
(defalias 'japanese-TeX-self-insert-command
+ ;; FIXME: `can-n-egg-self-insert-command' and
+ ;; `egg-self-insert-command' must be much obsolete because
+ ;; can-n-egg.el and egg.el are no longer available.
(cond ((fboundp 'can-n-egg-self-insert-command)
#'can-n-egg-self-insert-command)
((fboundp 'egg-self-insert-command)
@@ -526,13 +529,15 @@ overwrite the value already set locally."
(t
#'self-insert-command)))
-(defun TeX-insert-punctuation ()
+(defun japanese-TeX-insert-punctuation ()
"Insert point or comma, cleaning up preceding space."
(interactive)
(expand-abbrev)
(if (TeX-looking-at-backward "\\\\/\\(}+\\)" 50)
(replace-match "\\1" t))
(call-interactively #'japanese-TeX-self-insert-command))
+(advice-add 'TeX-insert-punctuation :override
+ #'japanese-TeX-insert-punctuation)
;;; Error Messages
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master e4c48a5a: Improve tex-jp.el politeness,
Ikumi Keita <=