yatex
diff yatex.el @ 627:f294195d0d3f
Add details add-in, which fills <summary>.
| author | HIROSE Yuuji <yuuji@gentei.org> |
|---|---|
| date | Tue, 11 Aug 2026 20:43:46 +0900 |
| parents | 8ad44217b2b0 |
| children |
line diff
1.1 --- a/yatex.el Sat Aug 01 12:46:18 2026 +0900 1.2 +++ b/yatex.el Tue Aug 11 20:43:46 2026 +0900 1.3 @@ -1,6 +1,6 @@ 1.4 -;;; yatex.el --- Yet Another tex-mode for emacs //–ì’¹// -*- coding: sjis -*- 1.5 -;;; (c)1991-2025 by HIROSE Yuuji.[yuuji@yatex.org] 1.6 -;;; Last modified Mon Feb 24 19:01:20 2025 on firestorm 1.7 +;;; yatex.el --- Yet Another tex-mode for emacs //–ì’¹// -*- coding: sjis; lexical-binding: nil -*- 1.8 +;;; (c)1991-2026 by HIROSE Yuuji.[yuuji@yatex.org] 1.9 +;;; Last modified Sat Aug 1 12:46:01 2026 on firestorm 1.10 ;;; $Id$ 1.11 ;;; The latest version of this software is always available at; 1.12 ;;; https://www.yatex.org/ 1.13 @@ -16,7 +16,7 @@ 1.14 1.15 ;;; Code: 1.16 (require 'yatexlib) 1.17 -(defconst YaTeX-revision-number "1.84" 1.18 +(defconst YaTeX-revision-number "1.84.1" 1.19 "Revision number of running yatex.el") 1.20 1.21 ;---------- Local variables ---------- 1.22 @@ -263,6 +263,8 @@ 1.23 "*(for Emacs 24.4+) Pass this value to electric-indent-local-mode. 1.24 -1 means `off'.") 1.25 1.26 +(defvar YaTeX-saved-screen-height nil "Not used in Unix systems") 1.27 + 1.28 ;;-- Math mode values -- 1.29 1.30 (defvar YaTeX-math-key-list-default 1.31 @@ -785,10 +787,6 @@ 1.32 (or (featurep 'xemacs) 1.33 (set (make-local-variable 'font-lock-defaults) 1.34 (get 'yatex-mode 'font-lock-defaults))) 1.35 - (and (boundp 'global-font-lock-mode) 1.36 - global-font-lock-mode 1.37 - ;; Workaround for Emacs30 on which global-font-lock ignored 1.38 - (font-lock-mode 1)) 1.39 )) 1.40 (use-local-map YaTeX-mode-map) 1.41 (set-syntax-table YaTeX-mode-syntax-table) 1.42 @@ -802,7 +800,9 @@ 1.43 (and (= 0 (buffer-size)) (file-exists-p YaTeX-template-file) 1.44 (y-or-n-p (format "Insert %s?" YaTeX-template-file)) 1.45 (insert-file-contents (expand-file-name YaTeX-template-file))) 1.46 - (run-hooks 'text-mode-hook 'yatex-mode-hook)) 1.47 + (if (fboundp 'run-mode-hooks) (run-mode-hooks)) 1.48 + (run-hooks 'text-mode-hook 'yatex-mode-hook) 1.49 + ) 1.50 1.51 ;---------- Define YaTeX-mode functions ---------- 1.52 (defvar YaTeX-ec "\\" "Escape character of current mark-up language.") 1.53 @@ -853,7 +853,7 @@ 1.54 (autoload 'YaTeX-on-parenthesis-p "yatexmth" "Check if on math-parens" t) 1.55 (autoload 'YaTeX-goto-open-paren "yatexmth" "Goto opening paren" t) 1.56 (autoload 'YaTeX-change-parentheses "yatexmth" "Change corresponding parens" t) 1.57 -(autoload 'YaTeX-goto-corresponding-paren "yatexmth" "\bigl\bigr jumps" t) 1.58 +(autoload 'YaTeX-goto-corresponding-paren "yatexmth" "\\bigl\\bigr jumps" t) 1.59 (autoload 'YaTeX-typeset-math-region "yatexmth" "Typeset math-region" t) 1.60 1.61 ;;autoload from yatexhlp.el 1.62 @@ -873,7 +873,7 @@ 1.63 (autoload 'YaTeX-what-column "yatexenv" "YaTeX env. specific funcs" t) 1.64 (autoload 'YaTeX-intelligent-newline "yatexenv" "YaTeX env. specific funcs" t) 1.65 (autoload 'YaTeX-indent-line-equation "yatexenv" "Indent equation lines." t) 1.66 -(autoload 'YaTeX-goto-corresponding-leftright "yatexenv" "\left\right jumps" t) 1.67 +(autoload 'YaTeX-goto-corresponding-leftright "yatexenv" "\\left\\right jumps" t) 1.68 1.69 ;;autoload from yatexhie.el 1.70 (autoload 'YaTeX-display-hierarchy "yatexhie" 1.71 @@ -1965,7 +1965,7 @@ 1.72 (if YaTeX-emacs-19 1.73 (setq regexp-search-ring 1.74 (cons string (delete string regexp-search-ring))) 1.75 - (setq search-last-regexp string))) 1.76 + (setq search-last-regexp string))) ;; For older emacsen 1.77 (t nil)))) 1.78 1.79 ;;YaTeX-goto-corresponding-environment was moved to yatexlib 1.80 @@ -2330,8 +2330,8 @@ 1.81 (YaTeX-goto-corresponding-* t)) 1.82 1.83 (defun YaTeX-comment-region (alt-prefix) 1.84 - "Comment out region by '%'. 1.85 -If you call this function on the 'begin{}' or 'end{}' line, 1.86 + "Comment out region by `%'. 1.87 +If you call this function on the `begin{}' or `end{}' line, 1.88 it comments out whole environment" 1.89 (interactive "P") 1.90 (if (not (YaTeX-on-begin-end-p)) 1.91 @@ -2504,7 +2504,7 @@ 1.92 (goto-char end) 1.93 (set-marker end nil) 1.94 (kill-append (buffer-substring (point) (1- (point))) nil) 1.95 - (delete-backward-char 1))))) 1.96 + (delete-char -1))))) 1.97 1.98 (defun YaTeX-kill-paren (kill-contents) 1.99 "Kill parentheses leaving its contents. 1.100 @@ -2531,9 +2531,9 @@ 1.101 ((save-excursion 1.102 (forward-char -2) 1.103 (looking-at (concat YaTeX-ec-regexp "/"))) 1.104 - (backward-delete-char 2)) 1.105 + (delete-char -2)) 1.106 ((= (char-after (1- (point))) ?\\) 1.107 - (backward-delete-char 1))) 1.108 + (delete-char -1))) 1.109 (goto-char p) 1.110 (if (looking-at 1.111 (concat "{" YaTeX-ec-regexp
