yatex
changeset 623:6a0fea36298f
Code cleaning for Emacs31
| author | HIROSE Yuuji <yuuji@gentei.org> |
|---|---|
| date | Sat, 01 Aug 2026 13:51:09 +0900 |
| parents | 8ad44217b2b0 |
| children | 0018833906a1 5f6ffe70a6ca |
| files | yahtml.el yatex.el yatex.new yatex19.el yatex23.el yatexadd.el yatexenv.el yatexflt.el yatexgen.el yatexhie.el yatexhks.el yatexhlp.el yatexinf.el yatexlib.el yatexm-o.el yatexmth.el yatexpkg.el yatexprc.el yatexsec.el |
| diffstat | 19 files changed, 227 insertions(+), 207 deletions(-) [+] |
line diff
1.1 --- a/yahtml.el Sat Aug 01 12:46:18 2026 +0900 1.2 +++ b/yahtml.el Sat Aug 01 13:51:09 2026 +0900 1.3 @@ -1,5 +1,5 @@ 1.4 -;;; yahtml.el --- Yet Another HTML mode -*- coding: sjis -*- 1.5 -;;; (c) 1994-2025 by HIROSE Yuuji [yuuji(@)yatex.org] 1.6 +;;; yahtml.el --- Yet Another HTML mode -*- coding: sjis; lexical-binding: nil -*- 1.7 +;;; (c) 1994-2026 by HIROSE Yuuji [yuuji(@)yatex.org] 1.8 ;;; $Id$ 1.9 1.10 (defconst yahtml-revision-number "1.84" 1.11 @@ -202,8 +202,8 @@ 1.12 (defvar yahtml-path-url-alist nil 1.13 "*Alist of unix path name vs. URL name of WWW server. 1.14 Ex. 1.15 -'((\"/usr/home/yuuji/http\" . \"http://www.comp.ae.keio.ac.jp/~yuuji\") 1.16 - (\"/home/yuuji/http\" . \"http://www.gentei.org/~yuuji\"))") 1.17 +((\"/usr/home/yuuji/http\" . \"http://www.comp.ae.keio.ac.jp/~yuuji\") 1.18 + (\"/home/yuuji/http\" . \"http://www.gentei.org/~yuuji\"))") 1.19 (defvar yahtml-directory-index "index.html" 1.20 "*Directory index file name; 1.21 Consult your site's WWW administrator.") 1.22 @@ -263,7 +263,7 @@ 1.23 "*Non-nil for translate hyphens to - when comment-region") 1.24 (defvar yahtml-escape-chars 'ask 1.25 "*Escape reserved characters to URL-encoding or not. 1.26 -Nil for never, t for everytime, and 'ask for inquiring 1.27 +Nil for never, t for everytime, and `ask' for inquiring 1.28 at each reserved chars.") 1.29 1.30 (defvar yahtml-use-font-lock (and (featurep 'font-lock) 1.31 @@ -297,6 +297,8 @@ 1.32 (or (and (boundp 'shell-command-option) shell-command-option) 1.33 (if (eq system-type 'ms-dos) "/c" "-c"))) 1.34 (defvar yahtml-use-highlighting (or yahtml-use-font-lock yahtml-use-hilit19)) 1.35 +(defvar yahtml-current-file-name nil) 1.36 +(defvar yahtml-css-class-alist nil "Alist of elements vs. their classes") 1.37 1.38 (defun yahtml-define-begend-key-normal (key env &optional map func) 1.39 "Define short cut yahtml-insert-begend key." 1.40 @@ -307,10 +309,11 @@ 1.41 (list func 'arg env)) 1.42 map))) 1.43 1.44 -(defun yahtml-define-begend-region-key (key env &optional map) 1.45 +(defun yahtml-define-begend-region-key (key env &optional map func) 1.46 "Define short cut yahtml-insert-begend-region key." 1.47 (YaTeX-define-key key (list 'lambda nil '(interactive) 1.48 - (list 'yahtml-insert-begend t env)) map)) 1.49 + (list (or func 'yahtml-insert-begend) 1.50 + t env)) map)) 1.51 1.52 (defun yahtml-define-begend-key (key env &optional map) 1.53 "Define short cut key for begin type completion. 1.54 @@ -328,7 +331,7 @@ 1.55 (yahtml-define-begend-key-normal key tag map 'yahtml-insert-tag) 1.56 (if YaTeX-inhibit-prefix-letter nil 1.57 (yahtml-define-begend-region-key 1.58 - (concat (upcase (substring key 0 1)) (substring key 1)) env map 1.59 + (concat (upcase (substring key 0 1)) (substring key 1)) tag map 1.60 'yahtml-insert-tag))) 1.61 1.62 (if yahtml-mode-map nil 1.63 @@ -602,8 +605,7 @@ 1.64 (setq charset 1)) 1.65 ((string-match "utf-8" charset) 1.66 (setq charset 4)) 1.67 - (t (setq charset nil))) 1.68 - (setq dir ""))) 1.69 + (t (setq charset nil))))) 1.70 (if (featurep 'mule) 1.71 (setq charset (cdr (assq charset YaTeX-kanji-code-alist)))) 1.72 charset)) 1.73 @@ -651,7 +653,7 @@ 1.74 (setq kanji-fileio-code coding)))) 1.75 (setq major-mode 'yahtml-mode 1.76 mode-name "yahtml" 1.77 - YaTeX-current-file-name (file-name-nondirectory 1.78 + yahtml-current-file-name (file-name-nondirectory 1.79 (or (buffer-file-name) "")) 1.80 local-abbrev-table yahtml-mode-abbrev-table) 1.81 (mapcar 1.82 @@ -755,6 +757,7 @@ 1.83 (defvar yahtml-menu-map-listing nil "Menu map of yahtml(listing)") 1.84 (defvar yahtml-menu-map-logical nil "Menu map of yahtml(logical tags)") 1.85 (defvar yahtml-menu-map-typeface nil "Menu map of yahtml(typeface tags)") 1.86 +(defvar yahtml-menu-map-item nil) 1.87 1.88 ;;; Variables for mosaic url history 1.89 (defvar yahtml-urls nil "Alist of global history") 1.90 @@ -1359,7 +1362,7 @@ 1.91 1.92 (defun yahtml-get-image-info (file) 1.93 "Return the information on the image file FILE. 1.94 -Returns list of '(WIDTH HEIGHT BYTES DEPTH COMMENTLIST)." 1.95 +Returns list of `(WIDTH HEIGHT BYTES DEPTH COMMENTLIST)'." 1.96 (save-excursion 1.97 (let*((tmpbuf (get-buffer-create " *imgheader*")) 1.98 width height bytes depth comment 1.99 @@ -1826,6 +1829,16 @@ 1.100 (if (or yahtml-always-/p arg) (yahtml-insert-tag arg "p") 1.101 (yahtml-insert-single "p"))) 1.102 1.103 +;;; ---------- translate to entity references ---------- 1.104 +(defvar yahtml-entity-reference-chars-alist-default 1.105 + ;'((?> . "gt") (?< . "lt") (?& . "amp") (?\" . "quot") (?' . "apos")) 1.106 + '((?> . "gt") (?< . "lt") (?& . "amp") (?\" . "quot")) 1.107 + "Default translation table from character to entity reference") 1.108 +(defvar yahtml-entity-reference-chars-alist nil 1.109 + "*Translation table from character to entity reference") 1.110 +(defvar yahtml-entity-reference-chars-regexp nil) 1.111 +(defvar yahtml-entity-reference-chars-reverse-regexp nil) 1.112 + 1.113 (defun yahtml-insert-amps (arg) 1.114 "Insert char-entity references via ampersand" 1.115 ;; Thanks; http://www.tsc.co.jp/~asada/html/wdg40_f/entities/ 1.116 @@ -1835,9 +1848,9 @@ 1.117 yahtml-entity-reference-chars-alist)) 1.118 (l list)) 1.119 (while l 1.120 - (setq mess (format "%s %c" mess (car (car l)) (cdr (car l))) 1.121 + (setq mess (format "%s %c=%s" mess (car (car l)) (cdr (car l))) 1.122 l (cdr l))) 1.123 - (message "Char-entity reference: %s SPC=& RET=&; BS=%s Other=&#..;" 1.124 + (message "Char-entity: %s RET=&; BS=%s Other=&#..;" 1.125 mess (if YaTeX-japan "直前の文字" "Preceding-Char")) 1.126 (setq c (read-char)) 1.127 (cond 1.128 @@ -1850,7 +1863,7 @@ 1.129 (insert ?&)) 1.130 ((and (memq c '(127 8)) 1.131 (setq c (preceding-char)) 1.132 - (delete-backward-char 1) 1.133 + (delete-char -1) 1.134 nil)) ;Fall through to the next 't block 1.135 (t (insert (format "&#x%x;" c)))))) 1.136 1.137 @@ -2022,7 +2035,8 @@ 1.138 t))))) 1.139 1.140 (defun yahtml-jump-to-name (name) 1.141 - "Jump to html's named tag." 1.142 + "Jump to html's named tag. 1.143 +Using dynamic variable in yahtml-goto-corresponding-href()." 1.144 (setq name (format "\\(name\\|id\\)\\s *=\\s *\"?%s\\>\"?" name)) 1.145 (or (and (re-search-forward name nil t) (goto-char (match-beginning 0))) 1.146 (and (re-search-backward name nil t) (goto-char (match-beginning 0))) 1.147 @@ -2386,7 +2400,6 @@ 1.148 ((yahtml-change-command)))) 1.149 1.150 ;;; ---------- commenting ---------- 1.151 - 1.152 (defun yahtml-comment-region (&optional uncom) 1.153 "Comment out region or environment." 1.154 (interactive) 1.155 @@ -2427,15 +2440,6 @@ 1.156 (interactive) 1.157 (yahtml-comment-region t)) 1.158 1.159 -;;; ---------- translate to entity references ---------- 1.160 -(defvar yahtml-entity-reference-chars-alist-default 1.161 - ;'((?> . "gt") (?< . "lt") (?& . "amp") (?\" . "quot") (?' . "apos")) 1.162 - '((?> . "gt") (?< . "lt") (?& . "amp") (?\" . "quot")) 1.163 - "Default translation table from character to entity reference") 1.164 -(defvar yahtml-entity-reference-chars-alist nil 1.165 - "*Translation table from character to entity reference") 1.166 -(defvar yahtml-entity-reference-chars-regexp nil) 1.167 -(defvar yahtml-entity-reference-chars-reverse-regexp nil) 1.168 1.169 (defun yahtml-entity-reference-chars-setup () 1.170 (let ((list (append yahtml-entity-reference-chars-alist-default 1.171 @@ -2510,7 +2514,8 @@ 1.172 (cond 1.173 ((string-match revrex right) 1.174 (setq ch (YaTeX-rassoc 1.175 - (substring right (match-beginning 1) (match-end 1))) 1.176 + (substring right (match-beginning 1) (match-end 1)) 1.177 + ct) 1.178 b0 (substring right 0 (match-beginning 0)) 1.179 right (substring right (match-end 0)) 1.180 left (concat left 1.181 @@ -2755,7 +2760,7 @@ 1.182 (itms "<\\(dt\\|dd\\|li\\|t[rdh]\\|option\\)\\b") 1.183 (excludes 1.184 "\\b\\(a\\|p\\|span\\|code\\|tt\\|em\\|u\\|i\\|big\\|small\\|font\\)\\b") 1.185 - inenv p col peol (case-fold-search t)) 1.186 + inenv p col peol op (case-fold-search t)) 1.187 (save-excursion 1.188 (beginning-of-line) 1.189 (setq inenv (or (yahtml-inner-environment-but excludes t) 1.190 @@ -2869,8 +2874,8 @@ 1.191 1.192 (defun yahtml-lint-buffer (buf) 1.193 "Call lint on buffer BUF." 1.194 + (interactive "bCall lint on buffer: ") 1.195 (require 'yatexprc) 1.196 - (interactive "bCall lint on buffer: ") 1.197 (setq buf (get-buffer buf)) 1.198 (YaTeX-save-buffers) 1.199 (let ((bcmd (YaTeX-get-builtin "lint"))) 1.200 @@ -3179,7 +3184,7 @@ 1.201 (end-of-line) 1.202 (if (re-search-backward yahtml-error-line-regexp nil t) 1.203 (let ((f (if (string= "" (YaTeX-match-string 1)) 1.204 - YaTeX-current-file-name 1.205 + yahtml-current-file-name 1.206 (YaTeX-match-string 1))) 1.207 (l (YaTeX-str2int (or (YaTeX-match-string 2) 1.208 (YaTeX-match-string 3))))) 1.209 @@ -3190,9 +3195,6 @@ 1.210 (message "No line number usage")))) 1.211 1.212 ;;; ---------- Style Sheet Support ---------- 1.213 -(defvar yahtml-css-class-alist nil 1.214 - "Alist of elements vs. their classes") 1.215 - 1.216 (defun yahtml-css-collect-classes-region (beg end &optional initial) 1.217 (save-excursion 1.218 (save-restriction
2.1 --- a/yatex.el Sat Aug 01 12:46:18 2026 +0900 2.2 +++ b/yatex.el Sat Aug 01 13:51:09 2026 +0900 2.3 @@ -1,6 +1,6 @@ 2.4 -;;; yatex.el --- Yet Another tex-mode for emacs //野鳥// -*- coding: sjis -*- 2.5 -;;; (c)1991-2025 by HIROSE Yuuji.[yuuji@yatex.org] 2.6 -;;; Last modified Mon Feb 24 19:01:20 2025 on firestorm 2.7 +;;; yatex.el --- Yet Another tex-mode for emacs //野鳥// -*- coding: sjis; lexical-binding: nil -*- 2.8 +;;; (c)1991-2026 by HIROSE Yuuji.[yuuji@yatex.org] 2.9 +;;; Last modified Sat Aug 1 12:46:01 2026 on firestorm 2.10 ;;; $Id$ 2.11 ;;; The latest version of this software is always available at; 2.12 ;;; https://www.yatex.org/ 2.13 @@ -16,7 +16,7 @@ 2.14 2.15 ;;; Code: 2.16 (require 'yatexlib) 2.17 -(defconst YaTeX-revision-number "1.84" 2.18 +(defconst YaTeX-revision-number "1.84.1" 2.19 "Revision number of running yatex.el") 2.20 2.21 ;---------- Local variables ---------- 2.22 @@ -263,6 +263,8 @@ 2.23 "*(for Emacs 24.4+) Pass this value to electric-indent-local-mode. 2.24 -1 means `off'.") 2.25 2.26 +(defvar YaTeX-saved-screen-height nil "Not used in Unix systems") 2.27 + 2.28 ;;-- Math mode values -- 2.29 2.30 (defvar YaTeX-math-key-list-default 2.31 @@ -785,10 +787,6 @@ 2.32 (or (featurep 'xemacs) 2.33 (set (make-local-variable 'font-lock-defaults) 2.34 (get 'yatex-mode 'font-lock-defaults))) 2.35 - (and (boundp 'global-font-lock-mode) 2.36 - global-font-lock-mode 2.37 - ;; Workaround for Emacs30 on which global-font-lock ignored 2.38 - (font-lock-mode 1)) 2.39 )) 2.40 (use-local-map YaTeX-mode-map) 2.41 (set-syntax-table YaTeX-mode-syntax-table) 2.42 @@ -802,7 +800,9 @@ 2.43 (and (= 0 (buffer-size)) (file-exists-p YaTeX-template-file) 2.44 (y-or-n-p (format "Insert %s?" YaTeX-template-file)) 2.45 (insert-file-contents (expand-file-name YaTeX-template-file))) 2.46 - (run-hooks 'text-mode-hook 'yatex-mode-hook)) 2.47 + (if (fboundp 'run-mode-hooks) (run-mode-hooks)) 2.48 + (run-hooks 'text-mode-hook 'yatex-mode-hook) 2.49 + ) 2.50 2.51 ;---------- Define YaTeX-mode functions ---------- 2.52 (defvar YaTeX-ec "\\" "Escape character of current mark-up language.") 2.53 @@ -853,7 +853,7 @@ 2.54 (autoload 'YaTeX-on-parenthesis-p "yatexmth" "Check if on math-parens" t) 2.55 (autoload 'YaTeX-goto-open-paren "yatexmth" "Goto opening paren" t) 2.56 (autoload 'YaTeX-change-parentheses "yatexmth" "Change corresponding parens" t) 2.57 -(autoload 'YaTeX-goto-corresponding-paren "yatexmth" "\bigl\bigr jumps" t) 2.58 +(autoload 'YaTeX-goto-corresponding-paren "yatexmth" "\\bigl\\bigr jumps" t) 2.59 (autoload 'YaTeX-typeset-math-region "yatexmth" "Typeset math-region" t) 2.60 2.61 ;;autoload from yatexhlp.el 2.62 @@ -873,7 +873,7 @@ 2.63 (autoload 'YaTeX-what-column "yatexenv" "YaTeX env. specific funcs" t) 2.64 (autoload 'YaTeX-intelligent-newline "yatexenv" "YaTeX env. specific funcs" t) 2.65 (autoload 'YaTeX-indent-line-equation "yatexenv" "Indent equation lines." t) 2.66 -(autoload 'YaTeX-goto-corresponding-leftright "yatexenv" "\left\right jumps" t) 2.67 +(autoload 'YaTeX-goto-corresponding-leftright "yatexenv" "\\left\\right jumps" t) 2.68 2.69 ;;autoload from yatexhie.el 2.70 (autoload 'YaTeX-display-hierarchy "yatexhie" 2.71 @@ -1965,7 +1965,7 @@ 2.72 (if YaTeX-emacs-19 2.73 (setq regexp-search-ring 2.74 (cons string (delete string regexp-search-ring))) 2.75 - (setq search-last-regexp string))) 2.76 + (setq search-last-regexp string))) ;; For older emacsen 2.77 (t nil)))) 2.78 2.79 ;;YaTeX-goto-corresponding-environment was moved to yatexlib 2.80 @@ -2330,8 +2330,8 @@ 2.81 (YaTeX-goto-corresponding-* t)) 2.82 2.83 (defun YaTeX-comment-region (alt-prefix) 2.84 - "Comment out region by '%'. 2.85 -If you call this function on the 'begin{}' or 'end{}' line, 2.86 + "Comment out region by `%'. 2.87 +If you call this function on the `begin{}' or `end{}' line, 2.88 it comments out whole environment" 2.89 (interactive "P") 2.90 (if (not (YaTeX-on-begin-end-p)) 2.91 @@ -2504,7 +2504,7 @@ 2.92 (goto-char end) 2.93 (set-marker end nil) 2.94 (kill-append (buffer-substring (point) (1- (point))) nil) 2.95 - (delete-backward-char 1))))) 2.96 + (delete-char -1))))) 2.97 2.98 (defun YaTeX-kill-paren (kill-contents) 2.99 "Kill parentheses leaving its contents. 2.100 @@ -2531,9 +2531,9 @@ 2.101 ((save-excursion 2.102 (forward-char -2) 2.103 (looking-at (concat YaTeX-ec-regexp "/"))) 2.104 - (backward-delete-char 2)) 2.105 + (delete-char -2)) 2.106 ((= (char-after (1- (point))) ?\\) 2.107 - (backward-delete-char 1))) 2.108 + (delete-char -1))) 2.109 (goto-char p) 2.110 (if (looking-at 2.111 (concat "{" YaTeX-ec-regexp
3.1 --- a/yatex.new Sat Aug 01 12:46:18 2026 +0900 3.2 +++ b/yatex.new Sat Aug 01 13:51:09 2026 +0900 3.3 @@ -1,6 +1,11 @@ 3.4 What's new in YaTeX/yahtml 3.5 野鳥/yahtml - 各バージョンの変更点について 3.6 3.7 +1.85 == yatex == 3.8 + Emacs31のlexical-binding警告対応 3.9 + 変数参照の整理 3.10 + == yateml == 3.11 + Emacs31のlexical-binding警告対応 3.12 1.84 == yatex == 3.13 verbatimtab, verbatimtabinput, listinginput補完追加 3.14 Emacs30でデフォルトでfont-lockが効かない対処を追加
4.1 --- a/yatex19.el Sat Aug 01 12:46:18 2026 +0900 4.2 +++ b/yatex19.el Sat Aug 01 13:51:09 2026 +0900 4.3 @@ -1,6 +1,6 @@ 4.4 -;;; yatex19.el -- YaTeX facilities for Emacs 19 or later -*- coding: sjis -*- 4.5 -;;; (c)1994-2017 by HIROSE Yuuji.[yuuji@yatex.org] 4.6 -;;; Last modified Sun Sep 17 10:22:54 2017 on firestorm 4.7 +;;; yatex19.el -- YaTeX facilities for Emacs 19 or later -*- coding: sjis; lexical-binding: nil -*- 4.8 +;;; (c)1994-2017,2026 by HIROSE Yuuji.[yuuji@yatex.org] 4.9 +;;; Last modified Sat Aug 1 11:25:35 2026 on firestorm 4.10 ;;; $Id$ 4.11 4.12 ;;; Code: 4.13 @@ -811,10 +811,7 @@ 4.14 (boundp 'byte-compile-current-file) 4.15 byte-compile-current-file 4.16 (progn 4.17 - (if YaTeX-emacs-20 (require 'font-lock)) 4.18 - (if (and (boundp 'window-system) window-system) 4.19 - (require 'hilit19) 4.20 - (error "Byte compile this file on window system! Not `-nw'!")))) 4.21 + (if YaTeX-emacs-20 (require 'font-lock)))) 4.22 4.23 (provide 'yatex19) 4.24
5.1 --- a/yatex23.el Sat Aug 01 12:46:18 2026 +0900 5.2 +++ b/yatex23.el Sat Aug 01 13:51:09 2026 +0900 5.3 @@ -1,6 +1,6 @@ 5.4 -;;; yatex23.el --- YaTeX facilities for Emacs 23 or later -*- coding: sjis -*- 5.5 -;;; (c)2014-2017 by HIROSE Yuuji.[yuuji@yatex.org] 5.6 -;;; Last modified Sun Sep 17 10:23:02 2017 on firestorm 5.7 +;;; yatex23.el --- YaTeX facilities for Emacs 23 or later -*- coding: sjis; lexical-binding: nil -*- 5.8 +;;; (c)2014-2026 by HIROSE Yuuji.[yuuji@yatex.org] 5.9 +;;; Last modified Sat Aug 1 11:09:19 2026 on firestorm 5.10 ;;; $Id$ 5.11 5.12 (require 'yatex19)
6.1 --- a/yatexadd.el Sat Aug 01 12:46:18 2026 +0900 6.2 +++ b/yatexadd.el Sat Aug 01 13:51:09 2026 +0900 6.3 @@ -1,12 +1,15 @@ 6.4 -;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis -*- 6.5 -;;; (c)1991-2022 by HIROSE Yuuji.[yuuji@yatex.org] 6.6 -;;; Last modified Thu Jul 23 22:53:51 2026 on firestorm 6.7 +;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis; lexical-binding: nil -*- 6.8 +;;; (c)1991-2026 by HIROSE Yuuji.[yuuji@yatex.org] 6.9 +;;; Last modified Sat Aug 1 12:55:44 2026 on firestorm 6.10 ;;; $Id$ 6.11 6.12 ;;; Code: 6.13 ;;; 6.14 ;;Sample functions for LaTeX environment. 6.15 ;;; 6.16 +(and (fboundp 'eval-when-compile) 6.17 + (eval-when-compile (require 'yatex))) 6.18 + 6.19 (defvar YaTeX:tabular-default-rule 6.20 "@{\\vrule width 1pt\\ }c|c|c@{\\ \\vrule width 1pt}" 6.21 "*Your favorite default rule format.") 6.22 @@ -2030,8 +2033,7 @@ 6.23 (setq str (YaTeX-read-string-or-skip "Grayscale values(0.0 - 1.0): ")) 6.24 (if (<= (string-to-number str) 1) 6.25 str 6.26 - (message "%s may be an error. Values from 0.0 to 1.0 are acceptable") 6.27 - str)) 6.28 + (message "%s may be an error. Values from 0.0 to 1.0 are acceptable" str))) 6.29 ((equal model "named") 6.30 (YaTeX::color-completing-read (concat type " color"))) 6.31 )))) 6.32 @@ -2143,9 +2145,11 @@ 6.33 (string< "" info) 6.34 (setq bb (format "bb=%s" info))) 6.35 (setq info (yahtml-get-image-info imgfilepath)) 6.36 - (car info) ;if has width value 6.37 - (car (cdr info)) ;if has height value 6.38 - (setq bb (format "bb=%d %d %d %d" 0 0 (car info) (car (cdr info))))) 6.39 + (and 6.40 + (car info) ;if has width value 6.41 + (car (cdr info)) ;if has height value 6.42 + (setq bb (format "bb=%d %d %d %d" 6.43 + 0 0 (car info) (car (cdr info)))))) 6.44 (save-excursion 6.45 (cond 6.46 ((and (save-excursion
7.1 --- a/yatexenv.el Sat Aug 01 12:46:18 2026 +0900 7.2 +++ b/yatexenv.el Sat Aug 01 13:51:09 2026 +0900 7.3 @@ -1,6 +1,6 @@ 7.4 -;;; yatexenv.el --- YaTeX environment-specific functions 7.5 -;;; (c) 1994-2019 by HIROSE Yuuji.[yuuji@yatex.org] 7.6 -;;; Last modified Sat May 25 14:46:33 2019 on firestorm 7.7 +;;; yatexenv.el --- YaTeX environment-specific functions -*- lexical-binding: nil -*- 7.8 +;;; (c) 1994-2026 by HIROSE Yuuji.[yuuji@yatex.org] 7.9 +;;; Last modified Sat Aug 1 11:40:53 2026 on firestorm 7.10 ;;; $Id$ 7.11 7.12 ;;; Code: 7.13 @@ -361,7 +361,7 @@ 7.14 7.15 ;;;###autoload 7.16 (defun YaTeX-goto-corresponding-leftright () 7.17 - "Go to corresponding \left or \right." 7.18 + "Go to corresponding \\left or \\right." 7.19 (let ((YaTeX-struct-begin "\\left%1") 7.20 (YaTeX-struct-end "\\right%1") 7.21 (YaTeX-struct-name-regexp "[][(){}\\.|]")
8.1 --- a/yatexflt.el Sat Aug 01 12:46:18 2026 +0900 8.2 +++ b/yatexflt.el Sat Aug 01 13:51:09 2026 +0900 8.3 @@ -1,7 +1,7 @@ 8.4 -;;; yatexflt.el --- YaTeX filter command utilizer -*- coding: sjis -*- 8.5 +;;; yatexflt.el --- YaTeX filter command utilizer -*- coding: sjis; lexical-binding: nil -*- 8.6 ;;; 8.7 -;;; (c)1993-2018 by HIROSE Yuuji.[yuuji@yatex.org] 8.8 -;;; Last modified Sat Jun 2 18:12:41 2018 on firestorm 8.9 +;;; (c)1993-2026 by HIROSE Yuuji.[yuuji@yatex.org] 8.10 +;;; Last modified Sat Aug 1 10:57:45 2026 on firestorm 8.11 ;;; $Id$ 8.12 8.13 ;;; Commentary: 8.14 @@ -15,7 +15,7 @@ 8.15 ;;; Example: 8.16 ;;; 8.17 ;;; [[LaTeX Source]] 8.18 -;;; %#BEGIN FILTER{foo.pdf}{dot -T %t -o o} 8.19 +;;; %#BEGIN FILTER{foo.pdf}{dot -T %t -o foo.pdf} 8.20 ;;; \if0 8.21 ;;; === 8.22 ;;; digraph { 8.23 @@ -99,13 +99,16 @@ 8.24 (defvar YaTeX-filter-special-env-alist 8.25 (append YaTeX-filter-special-env-alist-private 8.26 YaTeX-filter-special-env-alist-default)) 8.27 +(defvar YaTeX-write-file-hookvar 8.28 + (if (boundp 'write-file-functions) 'write-file-functions 8.29 + 'write-file-hooks)) 8.30 8.31 (defun YaTeX-filter-filter-set-conversion-flag () 8.32 (let ((ovl (get 'YaTeX-filter-filter-sentinel 'overlay))) 8.33 (if ovl ;; When successful conversion met, 8.34 (progn ;; (1)Set conversion complete flag 8.35 (add-hook ;; (2)Add hook of seim-automatic 8.36 - 'write-file-hooks ;; update of convert to write- 8.37 + YaTeX-write-file-hookvar ;; update of convert to write- 8.38 'YaTeX-filter-update-all) ;; file hook. 8.39 (overlay-put ovl 'converted t))))) 8.40
9.1 --- a/yatexgen.el Sat Aug 01 12:46:18 2026 +0900 9.2 +++ b/yatexgen.el Sat Aug 01 13:51:09 2026 +0900 9.3 @@ -1,7 +1,7 @@ 9.4 -;;; yatexgen.el --- YaTeX add-in function generator(rev.5) 9.5 +;;; yatexgen.el --- YaTeX add-in function generator(rev.5) -*- lexical-binding: nil -*- 9.6 9.7 -;;; (c)1991-1995,1999,2000,2017 by HIROSE Yuuji.[yuuji@yatex.org] 9.8 -;;; Last modified Sun Dec 21 14:04:49 2014 on firestorm 9.9 +;;; (c)1991-1995,1999,2000,2017,2026 by HIROSE Yuuji.[yuuji@yatex.org] 9.10 +;;; Last modified Sat Aug 1 12:17:51 2026 on firestorm 9.11 ;;; $Id$ 9.12 9.13 ;;; Code: 9.14 @@ -13,14 +13,15 @@ 9.15 9.16 (put 'YaTeX-setq 'lisp-indent-hook 1) 9.17 9.18 +(defvar YaTeX-generate-initial-message nil) 9.19 (YaTeX-setq YaTeX-generate-initial-message 9.20 " 自動生成モードへようこそ!! 9.21 9.22 -初めてやる人はこのバッファの例にしたがって指示通りにやって練習してね。 9.23 -本番の時もこのバッファに出るメッセージを *よく読んで* 操作しないとう 9.24 -まく関数が作れないよ!! 9.25 +初めてやる人はこのバッファの例にしたがって指示通りにやって練習するよろし。 9.26 +本番の時もこのバッファに出る案内を *よく読んで* 操作されたし。 9.27 +さらば具合よき関数は得られぬ!! 9.28 9.29 - ではリターンキーを押して下さい。" 9.30 + ではEnterを。" 9.31 " Welcome to auto-generation mode!! 9.32 9.33 If this is your first trial, exercise this according to example and 9.34 @@ -30,68 +31,79 @@ 9.35 9.36 Hit return key!") 9.37 9.38 +(defvar YaTeX-generate-start-message nil) 9.39 (YaTeX-setq YaTeX-generate-start-message 9.40 - "さぁはじめるよ.\n1.登録したい補完をやってみて. 9.41 + "ではとりかかろう.\n1.アドインを登録したい補完を入力されたし. 9.42 たとえば section 型補完の \\documentstyle だったら \\documentstyle{} 9.43 -だけをいれてみてね. ちゃんと『〜型補完』を使わないとダメよ!。 9.44 -で、おわったらりたーん!!" 9.45 +だけを入れることになる. ぬかりなく『〜型補完』を使わねばならぬ!。 9.46 +その上でEnter!!" 9.47 "Let's begin completion for which you want to make add-in function. 9.48 If you want to make add-in function for \\documentstyle input only 9.49 `\\documentstyle{}' *with* completion of yatex-mode. 9.50 If you finish this, please press RET.") 9.51 9.52 +(defvar YaTeX-generate-abort-message nil) 9.53 (YaTeX-setq YaTeX-generate-abort-message 9.54 - "やめた、やめた〜いめんどくせ〜" 9.55 + "もはや撤退のときである、しからばごめん" 9.56 "Aborted.") 9.57 9.58 +(defvar YaTeX-generate-same-message nil) 9.59 (YaTeX-setq YaTeX-generate-same-message 9.60 - "それじゃ、なにも変わってねぇだろーが! やめた。" 9.61 + "なにも変わってないでござるな! 中止にて候。" 9.62 "I found no difference between them. So I'm quitting.") 9.63 9.64 +(defvar YaTeX-generate-invalid-message nil) 9.65 (YaTeX-setq YaTeX-generate-invalid-message 9.66 "それは、ちと無理というものじゃ." 9.67 "It's impossible.") 9.68 9.69 +(defvar YaTeX-generate-idontknow-message nil) 9.70 (YaTeX-setq YaTeX-generate-idontknow-message 9.71 - "う〜ん、難しくてよくわからないなぁ。ばかでごめんねェ〜" 9.72 + "ぐぬぬ、難しくてよくわからんでござる。拙者には四千年早かったようだ。" 9.73 "Sorry I can't tell your adding method.") 9.74 9.75 +(defvar YaTeX-generate-confirm-message nil) 9.76 (YaTeX-setq YaTeX-generate-confirm-message 9.77 - "ということは、付け足したい部分はこれでいいのね" 9.78 + "さすれば、付け足したい部分はこれでよかろうか" 9.79 "Is it additional string of add-in function?") 9.80 9.81 +(defvar YaTeX-generate-output-message nil) 9.82 (YaTeX-setq YaTeX-generate-output-message 9.83 - "2.じゃ、それにくっつけたいものを *カーソルの位置に* 足してみて. 9.84 -さっきの \\documentstyle{} の例だと \\documentstyle[12pt]{} とかにするの。 9.85 -しつこいようだけど、今の位置からカーソル動かしちゃダメよ!! 9.86 -で、またおわったらりたーん!!" 9.87 + "2.せば、それに結合したきものを *カーソルの位置に* 足されよ。 9.88 +先刻の \\documentstyle{} の例だと \\documentstyle[12pt]{} となろう。 9.89 +執拗御免被りたいが、今の位置からカーソル動かすのは御法度でござるぞ!! 9.90 +しこうして、完了後にEnterじゃ!!" 9.91 "2.Then input additional string *at CURSOR POSITION* 9.92 According to last example \\documentstyle{}, 9.93 modify it \\documentstyle[12pt]{}. RET to finish.") 9.94 9.95 +(defvar YaTeX-generate-put-arg-message nil) 9.96 (YaTeX-setq YaTeX-generate-put-arg-message 9.97 - "3.このうち、キーボードから読み込んで欲しい文字列を順に入れて。 9.98 -さっきの \\documentstyle[12pt]{} だったら、付加する文字は[12pt]だけど 9.99 -手で入れたいのは 12pt の部分だけですね。 9.100 -で、全部入れ終ったら、りたーんだけうってね!!" 9.101 + "3.これのうち、キーボードから読み込んで欲しい文字列を順に入れてくだされ。 9.102 +先刻の \\documentstyle[12pt]{} であらば、付加する文字は[12pt]じゃが 9.103 +手で入れたいのは 12pt の部分だけであろう。 9.104 +全部入れ終ったら、Enterで完了である!!" 9.105 "3.In this string, extract string which you want to input from key 9.106 board with quiry afterwards. For example, though additional string is 9.107 \\documentstyle[12pt]{}, but you want enter only `12pt' by hand. 9.108 RET to finish!") 9.109 9.110 +(defvar YaTeX-generate-read-prompt-message nil) 9.111 (YaTeX-setq YaTeX-generate-read-prompt-message 9.112 - "4.では、あとでこれらの文字列を読み込む時に、どういうプロンプトを 9.113 -出したいですか? 順に入れて下さい。面倒なら単にリターンを打ってね。 9.114 -さっきの 12pt の部分だったら、『サイズは』とかがおすすめ。" 9.115 + "4.では、後にこれらの文字列を読み込む時に、案内として出すべきプロンプトを 9.116 +順に入れてくだされ。面倒なら単にEnterでよき。 9.117 +先の 12pt の部分だったら、『サイズは』とかを推奨致す。" 9.118 "4.When you use this add-in function afterwards, what message 9.119 do you like to be prompted with to enter these values. In last 9.120 example `12pt', typical prompt string may be `Size?: '.") 9.121 9.122 +(defvar YaTeX-generate-done-message nil) 9.123 (YaTeX-setq YaTeX-generate-done-message 9.124 - "よし! これが、君の作りたかった関数だ。~/.emacs にでも入れてせいぜい 9.125 -楽してくれ。このバッファ(*ご案内*)を yatex-mode にしておくから 9.126 -できた関数が本当にお望みの動作をするか確かめてみるといいかもね。 9.127 - ところで、この関数こんなに簡単だろう? そろそろ自分で書いたらどう? 9.128 + "よし! これが、うぬの作りたかった関数だ。~/.emacs にでも入れてせいぜい 9.129 +楽するがよかろう。このバッファ(*ご案内*)を yatex-mode にしておくゆえ 9.130 +できた関数が本当にお望みの動作をするか確かめてみるがよかろう。 9.131 + ところで、この関数こんなに簡単と察せられたのではなかろうか? 9.132 +そろそろ自分で書いたら如何であるか? 9.133 " 9.134 "OK! This is the definition of function you want to make! Add 9.135 this description to your ~/.emacs or so. Use this buffer(*Guide*) 9.136 @@ -100,26 +112,31 @@ 9.137 write your most favorite add-in function yourself! 9.138 ") 9.139 9.140 +(defvar YaTeX-generate-nomatch-message nil) 9.141 (YaTeX-setq YaTeX-generate-nomatch-message 9.142 - "こらこら、そんな文字列どこにもねーぞ!!" 9.143 + "こらこら、そんな文字列どこにも見当たらぬ。!!" 9.144 "No such string in additional string.") 9.145 9.146 +(defvar YaTeX-generate-buffer nil) 9.147 (YaTeX-setq YaTeX-generate-buffer 9.148 "*付加関数生成バッファ*" 9.149 "*Generate-add-in-function*") 9.150 9.151 +(defvar YaTeX-generate-message-buffer nil) 9.152 (YaTeX-setq YaTeX-generate-message-buffer 9.153 "*ご案内*" 9.154 "*Guide*") 9.155 9.156 +(defvar YaTeX-generate-bug-message nil) 9.157 (YaTeX-setq YaTeX-generate-bug-message 9.158 - "ごめ〜ん!! ちょっと、このアドイン関数つくるの失敗しちゃったみたい!! 9.159 -作者まで連絡してくださ〜〜〜い!" 9.160 + "これは痛恨の極み!! 拙者、このアドイン関数作成をし損なったようである!! 9.161 +何卒作者まで連絡してくださらぬか!" 9.162 "Sorry I failed to make add-in function for you... 9.163 Send bug report to me.") 9.164 9.165 +(defvar YaTeX-generate-narrow-message nil) 9.166 (YaTeX-setq YaTeX-generate-narrow-message 9.167 - "画面がせますぎるような気がします。" 9.168 + "画面が窮屈である。広げてはくださらぬか。" 9.169 "Too narrow screen height.") 9.170 9.171 (defvar YaTeX-generate-message-height 9.172 @@ -127,8 +144,8 @@ 9.173 9.174 ;; Do you need learning for generated function? 9.175 ;; If you need, please tell me (yuuji@yatex.org) 9.176 -;;(defvar YaTeX-generate-variables-for-learning nil) 9.177 -;;(defvar YaTeX-generate-current-completion-table nil) 9.178 +(defvar YaTeX-generate-variables-for-learning nil) 9.179 +(defvar YaTeX-generate-current-completion-table nil) 9.180 9.181 ;;; 9.182 ;Generate mode. 9.183 @@ -231,7 +248,7 @@ 9.184 (YaTeX-generate-display-message YaTeX-generate-done-message) 9.185 (switch-to-buffer YaTeX-generate-buffer) 9.186 (condition-case error 9.187 - (eval-current-buffer) 9.188 + (YaTeX-eval-buffer) 9.189 (error (insert YaTeX-generate-bug-message))) 9.190 (pop-to-buffer YaTeX-generate-message-buffer)) 9.191 9.192 @@ -520,7 +537,7 @@ 9.193 (insert "))\n") ;close defun 9.194 (goto-char (point-min)) 9.195 (while (not (eobp)) (lisp-indent-line) (forward-line 1)) 9.196 - (eval-current-buffer) 9.197 + (YaTeX-eval-buffer) 9.198 buf)) 9.199 9.200 (defun YaTeX-generate-argument-type (command argc) 9.201 @@ -551,7 +568,7 @@ 9.202 (insert "))\n") 9.203 (goto-char (point-min)) 9.204 (while (not (eobp)) (lisp-indent-line) (forward-line 1)) 9.205 - (eval-current-buffer) 9.206 + (YaTeX-eval-buffer) 9.207 (set-buffer cb) 9.208 (YaTeX-update-table 9.209 (if (> argc 1) (list command argc) (list command))
10.1 --- a/yatexhie.el Sat Aug 01 12:46:18 2026 +0900 10.2 +++ b/yatexhie.el Sat Aug 01 13:51:09 2026 +0900 10.3 @@ -1,7 +1,7 @@ 10.4 -;;; yatexhie.el --- YaTeX hierarchy browser 10.5 +;;; yatexhie.el --- YaTeX hierarchy browser -*- lexical-binding: nil -*- 10.6 ;;; 10.7 -;;; (c)1995-2013 by HIROSE Yuuji [yuuji@yatex.org] 10.8 -;;; Last modified Sun Dec 21 14:05:20 2014 on firestorm 10.9 +;;; (c)1995-2013,2026 by HIROSE Yuuji [yuuji@yatex.org] 10.10 +;;; Last modified Sat Aug 1 12:48:10 2026 on firestorm 10.11 ;;; $Id$ 10.12 10.13 ;;; Code: 10.14 @@ -19,6 +19,7 @@ 10.15 (if (and YaTeX-emacs-19 window-system) " Mouse2)select" "") 10.16 " ?)help")) 10.17 (defvar YaTeX-hierarchy-saved-wc nil "Saved window configuration.") 10.18 +(defvar YaTeX-hierarchy-mode-map nil "Keymap used in YaTeX-hierarchy-mode.") 10.19 10.20 ;; ----- Functions for parsing hierarchy ----- 10.21 10.22 @@ -391,7 +392,6 @@ 10.23 ) 10.24 10.25 ;; ----- Setting up keymap ----- 10.26 -(defvar YaTeX-hierarchy-mode-map nil "Keymap used in YaTeX-hierarchy-mode.") 10.27 (if YaTeX-hierarchy-mode-map nil 10.28 (setq YaTeX-hierarchy-mode-map (make-sparse-keymap)) 10.29 (define-key YaTeX-hierarchy-mode-map "n" 'YaTeX-hierarchy-next)
11.1 --- a/yatexhks.el Sat Aug 01 12:46:18 2026 +0900 11.2 +++ b/yatexhks.el Sat Aug 01 13:51:09 2026 +0900 11.3 @@ -1,4 +1,4 @@ 11.4 -;;; -*- Emacs-Lisp -*- 11.5 +;;; -*- mode: Emacs-Lisp; lexical-binding: nil -*- 11.6 ;;; Hooks for YaTeX 11.7 11.8 ;;; 野鳥に関連する記述(たとえばアドイン関数)は yatexhks.el という名前の
12.1 --- a/yatexhlp.el Sat Aug 01 12:46:18 2026 +0900 12.2 +++ b/yatexhlp.el Sat Aug 01 13:51:09 2026 +0900 12.3 @@ -1,7 +1,7 @@ 12.4 -;;; yatexhlp.el --- YaTeX helper for LaTeX -*- coding: sjis -*- 12.5 +;;; yatexhlp.el --- YaTeX helper for LaTeX -*- coding: sjis; lexical-binding: nil -*- 12.6 ;;; 12.7 -;;; (c)1994,1998,2004,2014,2015,2018 by HIROSE Yuuji.[yuuji@yatex.org] 12.8 -;;; Last modified Sat Jun 2 16:45:45 2018 on firestorm 12.9 +;;; (c)1994,1998,2004,2014,2015,2018,2026 by HIROSE Yuuji.[yuuji@yatex.org] 12.10 +;;; Last modified Sat Aug 1 12:49:42 2026 on firestorm 12.11 ;;; $Id$ 12.12 12.13 ;;; Code:
13.1 --- a/yatexinf.el Sat Aug 01 12:46:18 2026 +0900 13.2 +++ b/yatexinf.el Sat Aug 01 13:51:09 2026 +0900 13.3 @@ -1,6 +1,6 @@ 13.4 -;;; yatexinf.el -- YaTeX interfaces for Texinfo mode 13.5 -;;; (c)1994-2013 by HIROSE, Yuuji [yuuji@yatex.org] 13.6 -;;; Last modified Mon Apr 1 22:43:58 2013 on firestorm 13.7 +;;; yatexinf.el -- YaTeX interfaces for Texinfo mode -*- lexical-binding: t -*- 13.8 +;;; (c)1994-2013,2026 by HIROSE, Yuuji [yuuji@yatex.org] 13.9 +;;; Last modified Sat Aug 1 12:50:21 2026 on firestorm 13.10 13.11 ;;; Code: 13.12 (require 'yatex)
14.1 --- a/yatexlib.el Sat Aug 01 12:46:18 2026 +0900 14.2 +++ b/yatexlib.el Sat Aug 01 13:51:09 2026 +0900 14.3 @@ -1,7 +1,7 @@ 14.4 -;;; yatexlib.el --- YaTeX and yahtml common libraries -*- coding: sjis -*- 14.5 +;;; yatexlib.el --- YaTeX and yahtml common libraries -*- coding: sjis; lexical-binding: nil -*- 14.6 ;;; 14.7 -;;; (c)1994-2022 by HIROSE Yuuji.[yuuji@yatex.org] 14.8 -;;; Last modified Fri Dec 2 08:41:16 2022 on firestorm 14.9 +;;; (c)1994-2026 by HIROSE Yuuji.[yuuji@yatex.org] 14.10 +;;; Last modified Sat Aug 1 13:14:19 2026 on firestorm 14.11 ;;; $Id$ 14.12 14.13 ;;; Code: 14.14 @@ -90,7 +90,7 @@ 14.15 (defvar YaTeX-use-italic-bold (string< "20" emacs-version) 14.16 "*Non-nil tries to find italic/bold fontset. 14.17 This variable is effective when font-lock is used. 14.18 -\it, \bf 内部での日本語が□になってしまう場合はこれをnilにして下さい。") 14.19 +\\it, \\bf 内部での日本語が□になってしまう場合はこれをnilにして下さい。") 14.20 14.21 ;----------- work variables ---------------------------------------- 14.22 (defvar YaTeX-minibuffer-completion-map nil 14.23 @@ -207,7 +207,8 @@ 14.24 (interactive) 14.25 (let*((user-table (expand-file-name YaTeX-user-completion-table)) 14.26 (local-table (expand-file-name (file-name-nondirectory user-table))) 14.27 - var localvar localbuf (curbuf (current-buffer)) sexp) 14.28 + var localvar localbuf (curbuf (current-buffer)) sexp 14.29 + (warning-suppress-log-types '((files missing-lexbind-cookie)))) 14.30 (if YaTeX-user-table-is-read nil 14.31 (message "Loading user completion table") 14.32 (if (file-exists-p user-table) (load-file user-table) 14.33 @@ -891,7 +892,7 @@ 14.34 14.35 (defun YaTeX-split-string (str &optional sep null) 14.36 "Split string STR by every occurrence of SEP(regexp). 14.37 -If the optional second argument SEP is nil, it defaults to \"[ \f\t\n\r\v]+\". 14.38 +If the optional second argument SEP is nil, it defaults to \"[ \\f\\t\\n\\r\\v]+\". 14.39 Do not include null string by default. Non-nil for optional third argument 14.40 NULL includes null string in a list." 14.41 (let ((sep (or sep "[ \f\t\n\r\v]+")) 14.42 @@ -929,6 +930,14 @@ 14.43 (fset 'YaTeX-member (symbol-function 'member)) 14.44 (fset 'YaTeX-member (symbol-function 'YaTeX-member1))) 14.45 14.46 +;;; interactive-p 14.47 +(if (fboundp 'called-interactively-p) 14.48 + (defun YaTeX-interactive-p() 14.49 + (called-interactively-p 'interactive)) 14.50 + (fset 'YaTeX-interactive-p 'interactive-p)) 14.51 +(fset 'YaTeX-eval-buffer 14.52 + (if (fboundp 'eval-current-buffer) 'eval-current-buffer 'eval-buffer)) 14.53 + 14.54 ;;; 14.55 ;; Interface function for windows.el 14.56 ;;; 14.57 @@ -1105,7 +1114,7 @@ 14.58 (defun YaTeX-goto-corresponding-environment (&optional allow-mismatch noerr bg) 14.59 "Go to corresponding begin/end enclosure. 14.60 Optional argument ALLOW-MISMATCH allows mismatch open/clese. Use this 14.61 -for \left(, \right). 14.62 +for \\left(, \\right). 14.63 Optional third argument NOERR causes no error for unballanced environment." 14.64 (interactive) 14.65 (if (not (YaTeX-on-begin-end-p)) nil 14.66 @@ -1220,7 +1229,7 @@ 14.67 (progn 14.68 (goto-char (get 'YaTeX-inner-environment 'point)) 14.69 (and end (YaTeX-goto-corresponding-environment)) 14.70 - (if (interactive-p) (push-mark op)) 14.71 + (if (YaTeX-interactive-p) (push-mark op)) 14.72 (point))))) 14.73 14.74 (defun YaTeX-end-of-environment (&optional limit-search-bound)
15.1 --- a/yatexm-o.el Sat Aug 01 12:46:18 2026 +0900 15.2 +++ b/yatexm-o.el Sat Aug 01 13:51:09 2026 +0900 15.3 @@ -1,7 +1,7 @@ 15.4 -;;; yatexm-o.el --- Sample to invoke yatex-mode with outline-minor mode 15.5 - 15.6 -;;; (c)1993 by HIROSE Yuuji [yuuji@yatex.org] 15.7 -;;; Last modified Sun Dec 21 14:15:47 2014 on firestorm 15.8 +;;; yatexm-o.el --- Sample to invoke yatex-mode with outline-minor mode -*- lexical-binding: nil -*- 15.9 +;;; (maybe obsoleted) 15.10 +;;; (c)1993,2026 by HIROSE Yuuji [yuuji@yatex.org] 15.11 +;;; Last modified Sat Aug 1 12:51:57 2026 on firestorm 15.12 15.13 ;;; Code: 15.14 ;;;
16.1 --- a/yatexmth.el Sat Aug 01 12:46:18 2026 +0900 16.2 +++ b/yatexmth.el Sat Aug 01 13:51:09 2026 +0900 16.3 @@ -1,7 +1,7 @@ 16.4 -;;; yatexmth.el --- YaTeX math-mode-specific functions -*- coding: sjis -*- 16.5 +;;; yatexmth.el --- YaTeX math-mode-specific functions -*- coding: sjis; lexical-binding: nil -*- 16.6 ;;; 16.7 ;;; (c)1993-2022 by HIROSE Yuuji [yuuji@yatex.org] 16.8 -;;; Last modified Sun Dec 25 13:56:02 2022 on firestorm 16.9 +;;; Last modified Sat Aug 1 13:45:38 2026 on firestorm 16.10 ;;; $Id$ 16.11 16.12 ;;; Commentary: 16.13 @@ -90,7 +90,7 @@ 16.14 (eq dos-machine-type 'pc98))) 16.15 16.16 (defmacro YaTeX-setq-math-sym (sym old new) 16.17 - (list 'setq sym (list 'if 'YaTeX-jisold old new))) 16.18 + (list 'defvar sym (list 'if 'YaTeX-jisold old new))) 16.19 16.20 (YaTeX-setq-math-sym YaTeX-image-in "E" "∈") 16.21 (YaTeX-setq-math-sym YaTeX-image-ni "ヨ" "∋")
17.1 --- a/yatexpkg.el Sat Aug 01 12:46:18 2026 +0900 17.2 +++ b/yatexpkg.el Sat Aug 01 13:51:09 2026 +0900 17.3 @@ -1,7 +1,7 @@ 17.4 -;;; yatexpkg.el --- YaTeX package manager -*- coding: sjis -*- 17.5 +;;; yatexpkg.el --- YaTeX package manager -*- coding: sjis; lexical-binding: nil -*- 17.6 ;;; 17.7 -;;; (c)2003-2022 by HIROSE, Yuuji [yuuji@yatex.org] 17.8 -;;; Last modified Sun Nov 24 20:43:19 2024 on firestorm 17.9 +;;; (c)2003-2022,2026 by HIROSE, Yuuji [yuuji@yatex.org] 17.10 +;;; Last modified Sat Aug 1 12:54:02 2026 on firestorm 17.11 ;;; $Id$ 17.12 17.13 ;;; Code:
18.1 --- a/yatexprc.el Sat Aug 01 12:46:18 2026 +0900 18.2 +++ b/yatexprc.el Sat Aug 01 13:51:09 2026 +0900 18.3 @@ -1,7 +1,7 @@ 18.4 -;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*- 18.5 +;;; yatexprc.el --- YaTeX process handler -*- coding: sjis; lexical-binding: nil -*- 18.6 ;;; 18.7 -;;; (c)1993-2022 by HIROSE Yuuji.[yuuji@yatex.org] 18.8 -;;; Last modified Thu Dec 1 19:13:20 2022 on firestorm 18.9 +;;; (c)1993-2022,2026 by HIROSE Yuuji.[yuuji@yatex.org] 18.10 +;;; Last modified Sat Aug 1 13:21:56 2026 on firestorm 18.11 ;;; $Id$ 18.12 18.13 ;;; Code: 18.14 @@ -1254,6 +1254,7 @@ 18.15 (raise-frame edit-frame) 18.16 (select-frame edit-frame))) 18.17 ) 18.18 + ;; Keep these code below for future thinking... 18.19 (error-win (select-window error-win)) 18.20 ((eq (get-lru-window) typeset-win) 18.21 (YaTeX-switch-to-buffer error-buffer)) 18.22 @@ -1523,7 +1524,7 @@ 18.23 Use set-buffer instead of switch-to-buffer if the optional argument 18.24 SETBUF is t(Use it only from Emacs-Lisp program)." 18.25 (interactive "P") 18.26 - (if (and (interactive-p) setbuf) (setq YaTeX-parent-file nil)) 18.27 + (if (and (YaTeX-interactive-p) setbuf) (setq YaTeX-parent-file nil)) 18.28 (let ((ff (function (lambda (f) 18.29 (if setbuf (set-buffer (find-file-noselect f)) 18.30 (find-file f))))) 18.31 @@ -1535,7 +1536,7 @@ 18.32 (setq main-file ;;(get-file-buffer YaTeX-parent-file) 18.33 YaTeX-parent-file)) 18.34 (if (YaTeX-main-file-p) 18.35 - (if (interactive-p) (message "I think this is main LaTeX source.") nil) 18.36 + (if (YaTeX-interactive-p) (message "I think this is main LaTeX source.") nil) 18.37 (cond 18.38 ((and ;;(interactive-p) 18.39 main-file
19.1 --- a/yatexsec.el Sat Aug 01 12:46:18 2026 +0900 19.2 +++ b/yatexsec.el Sat Aug 01 13:51:09 2026 +0900 19.3 @@ -1,7 +1,7 @@ 19.4 -;;; yatexsec.el --- YaTeX sectioning browser 19.5 +;;; yatexsec.el --- YaTeX sectioning browser -*- lexical-binding: nil -*- 19.6 ;;; 19.7 -;;; (c) 1994-2017 by HIROSE Yuuji [yuuji@yatex.org] 19.8 -;;; Last modified Wed May 30 13:29:50 2018 on firestorm 19.9 +;;; (c) 1994-2017,2026 by HIROSE Yuuji [yuuji@yatex.org] 19.10 +;;; Last modified Sat Aug 1 13:35:14 2026 on firestorm 19.11 ;;; $Id$ 19.12 19.13 ;;; Code: 19.14 @@ -26,8 +26,7 @@ 19.15 (let ((ch ?0)) 19.16 (while (<= ch ?9) 19.17 (define-key map (char-to-string ch) 'YaTeX-sectioning-hide) 19.18 - (setq ch (1+ ch)))) 19.19 -) 19.20 + (setq ch (1+ ch))))) 19.21 19.22 (defvar YaTeX-sectioning-minibuffer-map nil 19.23 "Key map used in minibuffer for sectioning.") 19.24 @@ -62,8 +61,7 @@ 19.25 'YaTeX-sectioning-recenter) 19.26 (define-key YaTeX-sectioning-minibuffer-map "?" 19.27 'YaTeX-sectioning-help) 19.28 - (YaTeX-sectioning-map-hide YaTeX-sectioning-minibuffer-map) 19.29 -) 19.30 + (YaTeX-sectioning-map-hide YaTeX-sectioning-minibuffer-map)) 19.31 19.32 (defvar YaTeX-sectioning-buffer-map nil 19.33 "Key map used in YaTeX-sectioning-buffer.") 19.34 @@ -91,8 +89,7 @@ 19.35 (and YaTeX-emacs-19 (boundp 'window-system) (eq window-system 'x) 19.36 (define-key YaTeX-sectioning-buffer-map [?\C-/] 19.37 'YaTeX-shift-section-undo)) 19.38 - (YaTeX-sectioning-map-hide YaTeX-sectioning-buffer-map) 19.39 -) 19.40 + (YaTeX-sectioning-map-hide YaTeX-sectioning-buffer-map)) 19.41 19.42 (defun YaTeX-sectioning-mode () 19.43 "Mode for browsing document's sectioning structure. 19.44 @@ -110,8 +107,7 @@ 19.45 (interactive) 19.46 (setq major-mode 'YaTeX-sectioning-mode 19.47 mode-name "sectioning") 19.48 - (use-local-map YaTeX-sectioning-buffer-map) 19.49 -) 19.50 + (use-local-map YaTeX-sectioning-buffer-map)) 19.51 19.52 (defvar YaTeX-sectioning-buffer-parent nil) 19.53 (defun YaTeX-sectioning-buffer-jump-internal (&optional keep) 19.54 @@ -152,14 +148,12 @@ 19.55 (if (and YaTeX-sectioning-buffer-parent 19.56 (get-buffer YaTeX-sectioning-buffer-parent)) 19.57 (YaTeX-sectioning-buffer-jump-internal keep) 19.58 - (message "No line number expression.")) 19.59 -) 19.60 + (message "No line number expression."))) 19.61 19.62 (defun YaTeX-sectioning-buffer-show () 19.63 "Show corresponding sectioning unit with current line." 19.64 (interactive) 19.65 - (YaTeX-sectioning-buffer-jump-internal t) 19.66 -) 19.67 + (YaTeX-sectioning-buffer-jump-internal t)) 19.68 19.69 (defun YaTeX-sectioning-hide-under (n) 19.70 "Hide sectioning commands under level N." 19.71 @@ -176,8 +170,8 @@ 19.72 (if (numberp selective-display) 19.73 (setq mode-name (format "level %d" (1- selective-display))) 19.74 (setq mode-name (format "all"))) 19.75 - (select-window cw)) 19.76 -) 19.77 + (select-window cw))) 19.78 + 19.79 (defun YaTeX-sectioning-hide () 19.80 "Call YaTeX-sectioning-hide-under with argument according to pressed key." 19.81 (interactive) 19.82 @@ -212,8 +206,7 @@ 19.83 (momentary-string-display "" (point-min))) 19.84 (bury-buffer hb) 19.85 (switch-to-buffer sb) 19.86 - (select-window cw))) 19.87 -) 19.88 + (select-window cw)))) 19.89 19.90 (defun YaTeX-sectioning-up (n) 19.91 "Up section level. 19.92 @@ -233,14 +226,12 @@ 19.93 (if (or (< level 0) (>= level (length alist))) 19.94 (ding) 19.95 (YaTeX-minibuffer-erase) 19.96 - (insert (concat (car (nth level alist)) (if aster "*" "")))))) 19.97 -) 19.98 + (insert (concat (car (nth level alist)) (if aster "*" ""))))))) 19.99 19.100 (defun YaTeX-sectioning-down (n) 19.101 "Down section level." 19.102 (interactive "p") 19.103 - (YaTeX-sectioning-up (- n)) 19.104 -) 19.105 + (YaTeX-sectioning-up (- n))) 19.106 19.107 (defun YaTeX-sectioning-scroll-up (n) 19.108 (interactive "P") 19.109 @@ -249,8 +240,7 @@ 19.110 (YaTeX-showup-buffer section-buffer nil t) 19.111 (unwind-protect 19.112 (scroll-up (or n (- (window-height) 2))) 19.113 - (select-window cw))) 19.114 -) 19.115 + (select-window cw)))) 19.116 19.117 (defun YaTeX-sectioning-scroll-down (n) 19.118 (interactive "P") 19.119 @@ -259,8 +249,7 @@ 19.120 (YaTeX-showup-buffer section-buffer nil t) 19.121 (unwind-protect 19.122 (scroll-down (or n (- (window-height) 2))) 19.123 - (select-window cw))) 19.124 -) 19.125 + (select-window cw)))) 19.126 19.127 (defun YaTeX-sectioning-recenter (arg) 19.128 "Recenter `<<--' line" 19.129 @@ -272,8 +261,7 @@ 19.130 (or (search-forward "<<--" nil t) 19.131 (search-backward "<<--" nil)) 19.132 (recenter (or arg (/ (window-height) 2)))) 19.133 - (select-window cw))) 19.134 -) 19.135 + (select-window cw)))) 19.136 19.137 (defvar YaTeX-sectioning-minibuffer " *sectioning*" 19.138 "Miniuffer used for sectioning") 19.139 @@ -282,16 +270,14 @@ 19.140 (interactive) 19.141 (let ((minibuffer-completion-table table)) 19.142 (read-from-minibuffer 19.143 - prompt default YaTeX-sectioning-minibuffer-map)) 19.144 -) 19.145 + prompt default YaTeX-sectioning-minibuffer-map))) 19.146 19.147 (defun YaTeX-get-sectioning-level () 19.148 "Get section-level on the cursor." 19.149 (cdr-safe (assoc (buffer-substring 19.150 (point) 19.151 (progn (skip-chars-forward "a-z") (point))) 19.152 - YaTeX-sectioning-level)) 19.153 -) 19.154 + YaTeX-sectioning-level))) 19.155 19.156 (defvar YaTeX-sectioning-buffer "*Sectioning lines*") 19.157 (defvar YaTeX-sectioning-indent 1) 19.158 @@ -330,8 +316,7 @@ 19.159 (setq YaTeX-sectioning-buffer-parent cb) 19.160 (if (numberp selective-display) 19.161 (setq mode-name (format "level %d" (1- selective-display)))) 19.162 - YaTeX-sectioning-buffer)) 19.163 -) 19.164 + YaTeX-sectioning-buffer))) 19.165 19.166 (defvar YaTeX-pending-undo nil) 19.167 (defun YaTeX-section-overview () 19.168 @@ -360,8 +345,7 @@ 19.169 (forward-line 1) 19.170 (if (eobp) (recenter -1) (recenter -3)) 19.171 (select-window cw) 19.172 - command)) 19.173 -) 19.174 + command))) 19.175 19.176 ;;;###autoload 19.177 (defun YaTeX-make-section-with-overview () 19.178 @@ -373,21 +357,19 @@ 19.179 "Sectioning(Up=C-p, Down=C-n, Help=?): " 19.180 YaTeX-sectioning-level (YaTeX-section-overview)) 19.181 "{}") 19.182 - (forward-char -1) 19.183 -) 19.184 + (forward-char -1)) 19.185 19.186 (defun YaTeX-shifted-section (sc n) 19.187 "Get SC's N-shifted sectioning command." 19.188 (let (lv) 19.189 (setq lv (- (cdr (assoc sc YaTeX-sectioning-level)) n) 19.190 lv (max (min YaTeX-sectioning-max-level lv) 0)) 19.191 - (car (nth lv YaTeX-sectioning-level))) 19.192 -) 19.193 + (car (nth lv YaTeX-sectioning-level)))) 19.194 19.195 (defun YaTeX-shift-section-up (n) 19.196 "Shift sectioning command down by level N." 19.197 (interactive "p") 19.198 - (let ((cb (current-buffer)) sc nsc lv) 19.199 + (let ((cb (current-buffer)) nsc lv) 19.200 (if (and YaTeX-sectioning-buffer-parent 19.201 (get-buffer YaTeX-sectioning-buffer-parent) 19.202 (save-excursion 19.203 @@ -421,13 +403,13 @@ 19.204 (undo-boundary)) 19.205 (set-buffer-modified-p nil) 19.206 (setq YaTeX-pending-undo pending-undo-list) 19.207 - ))) 19.208 -) 19.209 + )))) 19.210 + 19.211 (defun YaTeX-shift-section-down (n) 19.212 "Shift sectioning command down by level N." 19.213 (interactive "p") 19.214 - (YaTeX-shift-section-up (- n)) 19.215 -) 19.216 + (YaTeX-shift-section-up (- n))) 19.217 + 19.218 (defun YaTeX-shift-section-undo (arg) 19.219 "Undo YaTeX-shift-section-up/down." 19.220 (interactive "p") 19.221 @@ -449,8 +431,8 @@ 19.222 (undo arg) 19.223 (setq YaTeX-pending-undo pending-undo-list)) 19.224 (goto-buffer-window cb) 19.225 - (setq this-command 'YaTeX-shift-section-undo))) 19.226 -) 19.227 + (setq this-command 'YaTeX-shift-section-undo)))) 19.228 + 19.229 (defun YaTeX-sync-section-buffer () 19.230 "Synchronize *Sectioning Lines* buffer with parent buffer." 19.231 (interactive) 19.232 @@ -460,8 +442,8 @@ 19.233 (set-buffer (get-buffer YaTeX-sectioning-buffer-parent)) 19.234 (YaTeX-section-overview) 19.235 (switch-to-buffer cb) 19.236 - (goto-char p))) 19.237 -) 19.238 + (goto-char p)))) 19.239 + 19.240 (defun YaTeX-shift-section-up-region (beg end n) 19.241 "Shift sectioning commands in region down by level N." 19.242 (interactive "r\np") 19.243 @@ -503,22 +485,22 @@ 19.244 (insert (cdr (car repllist))) 19.245 (goto-char (match-beginning 0)))) 19.246 (setq repllist (cdr repllist)))) 19.247 - (goto-buffer-window cb))) 19.248 -) 19.249 + (goto-buffer-window cb)))) 19.250 + 19.251 (defun YaTeX-shift-section-down-region (beg end n) 19.252 "Shift sectioning commands in region down by level N." 19.253 (interactive "r\np") 19.254 - (YaTeX-shift-section-up-region beg end (- n)) 19.255 -) 19.256 + (YaTeX-shift-section-up-region beg end (- n))) 19.257 + 19.258 (defun YaTeX-sectioning-buffer-next-line (n) 19.259 "Move to next line in *Sectioning Lines* buffer." 19.260 (interactive "p") 19.261 (forward-line n) 19.262 - (skip-chars-forward " \t%") 19.263 -) 19.264 + (skip-chars-forward " \t%")) 19.265 + 19.266 (defun YaTeX-sectioning-buffer-prev-line (n) 19.267 "Move to previous line in *Sectioning Lines* buffer." 19.268 (interactive "p") 19.269 - (YaTeX-sectioning-buffer-next-line (- n)) 19.270 -) 19.271 + (YaTeX-sectioning-buffer-next-line (- n))) 19.272 + 19.273 (provide 'yatexsec)
