hns-setupを実行後、defined(%array) な箇所のdefinedを全部消して回ったらとりあえず動いた。ただし、付属のhnf-mode.elは、Emacs 30では動かない。
$ freebsd-version
13.2-RELEASE-p4
$ httpd -v
Server version: Apache/2.4.57 (FreeBSD)
$ perl -v
This is perl 5, version 34, subversion 1 (v5.34.1) built for amd64-freebsd-thread-multi
$ pkg info -a | grep ja-hns
ja-hns-2.19.9_1 Hyper NIKKI System, a CGI system for Electric Diary Interchange
Debugger entered--Lisp error: (invalid-function `(cond ((cdr (assq (,key) (cdr (...))))) ((hnf-command-type-get-variable (hnf-command-get-type (,command)) (,key)))))
(`(cond ((cdr (assq (,key) (cdr (...))))) ((hnf-command-type-get-variable (hnf-command-get-type (,command)) (,key)))))
(lambda (command key) (`(cond ((cdr (assq ... ...))) ((hnf-command-type-get-variable (hnf-command-get-type ...) (...))))))(command 'face)
apply((lambda (command key) (`(cond ((cdr (assq ... ...))) ((hnf-command-type-get-variable (hnf-command-get-type ...) (...)))))) (command 'face))
macroexpand-1((hnf-command-get-variable command 'face) nil)
macroexp-macroexpand((hnf-command-get-variable command 'face) nil)
macroexp--expand-all((hnf-command-get-variable command 'face))
macroexp--expand-all((setq face (hnf-command-get-variable command 'face)))
macroexp--all-forms((if (setq face (hnf-command-get-variable command 'face)) (add-to-list 'ret1 (cons (concat "^" (car command) ".*") face)) (let ((args (hnf-command-get-variable command 'args)) (cnt 0) arg) (while (setq arg (car args)) (if (setq face (cond (... ...) (... ...) (... ...))) (add-to-list 'ret2 (list (concat "^" ... " +" ... "\\([^ ]+\\)") 1 face))) (setq cnt (1+ cnt) args (cdr args))))) 1)
#f(compiled-function (form func) #<bytecode -0x627bbee1c67261>)(((if (setq face (hnf-command-get-variable command 'face)) (add-to-list 'ret1 (cons (concat "^" (car command) ".*") face)) (let ((args (hnf-command-get-variable command 'args)) (cnt 0) arg) (while (setq arg (car args)) (if (setq face (cond ... ... ...)) (add-to-list 'ret2 (list ... 1 face))) (setq cnt (1+ cnt) args (cdr args)))))) if)
macroexp--expand-all((if (setq face (hnf-command-get-variable command 'face)) (add-to-list 'ret1 (cons (concat "^" (car command) ".*") face)) (let ((args (hnf-command-get-variable command 'args)) (cnt 0) arg) (while (setq arg (car args)) (if (setq face (cond (... ...) (... ...) (... ...))) (add-to-list 'ret2 (list (concat "^" ... " +" ... "\\([^ ]+\\)") 1 face))) (setq cnt (1+ cnt) args (cdr args))))))
macroexp--all-forms((while (setq command (car commands)) (if (setq face (hnf-command-get-variable command 'face)) (add-to-list 'ret1 (cons (concat "^" (car command) ".*") face)) (let ((args (hnf-command-get-variable command 'args)) (cnt 0) arg) (while (setq arg (car args)) (if (setq face (cond ... ... ...)) (add-to-list 'ret2 (list ... 1 face))) (setq cnt (1+ cnt) args (cdr args))))) (add-to-list 'ret3 (if (hnf-command-need-close-p command) (concat (car command) "\\|/" (car command)) (car command))) (setq commands (cdr commands))) 1)
#f(compiled-function (form func) #<bytecode -0x627bbee1c67261>)(((while (setq command (car commands)) (if (setq face (hnf-command-get-variable command 'face)) (add-to-list 'ret1 (cons (concat "^" (car command) ".*") face)) (let ((args (hnf-command-get-variable command ...)) (cnt 0) arg) (while (setq arg (car args)) (if (setq face ...) (add-to-list ... ...)) (setq cnt (1+ cnt) args (cdr args))))) (add-to-list 'ret3 (if (hnf-command-need-close-p command) (concat (car command) "\\|/" (car command)) (car command))) (setq commands (cdr commands)))) while)
macroexp--expand-all((while (setq command (car commands)) (if (setq face (hnf-command-get-variable command 'face)) (add-to-list 'ret1 (cons (concat "^" (car command) ".*") face)) (let ((args (hnf-command-get-variable command 'args)) (cnt 0) arg) (while (setq arg (car args)) (if (setq face (cond ... ... ...)) (add-to-list 'ret2 (list ... 1 face))) (setq cnt (1+ cnt) args (cdr args))))) (add-to-list 'ret3 (if (hnf-command-need-close-p command) (concat (car command) "\\|/" (car command)) (car command))) (setq commands (cdr commands))))
macroexp--all-forms(((while (setq command (car commands)) (if (setq face (hnf-command-get-variable command 'face)) (add-to-list 'ret1 (cons (concat "^" (car command) ".*") face)) (let ((args (hnf-command-get-variable command ...)) (cnt 0) arg) (while (setq arg (car args)) (if (setq face ...) (add-to-list ... ...)) (setq cnt (1+ cnt) args (cdr args))))) (add-to-list 'ret3 (if (hnf-command-need-close-p command) (concat (car command) "\\|/" (car command)) (car command))) (setq commands (cdr commands))) (append ret1 ret2 (list (cons (concat "^\\(" (mapconcat #'identity ret3 "\\|") "\\)\\>") hnf-command-face)) (list '(eval list (concat "^\\(" (mapconcat ... hnf-variable "\\|") "\\)\\>") '(0 ...))) (list (cons "~$" hnf-tilde-face)))))
macroexp--expand-all((let ((commands hnf-commands-table) command type face ret1 ret2 ret3) (while (setq command (car commands)) (if (setq face (hnf-command-get-variable command 'face)) (add-to-list 'ret1 (cons (concat "^" (car command) ".*") face)) (let ((args (hnf-command-get-variable command ...)) (cnt 0) arg) (while (setq arg (car args)) (if (setq face ...) (add-to-list ... ...)) (setq cnt (1+ cnt) args (cdr args))))) (add-to-list 'ret3 (if (hnf-command-need-close-p command) (concat (car command) "\\|/" (car command)) (car command))) (setq commands (cdr commands))) (append ret1 ret2 (list (cons (concat "^\\(" (mapconcat #'identity ret3 "\\|") "\\)\\>") hnf-command-face)) (list '(eval list (concat "^\\(" (mapconcat ... hnf-variable "\\|") "\\)\\>") '(0 ...))) (list (cons "~$" hnf-tilde-face)))))
macroexp--expand-all((setq hnf-font-lock-keywords (let ((commands hnf-commands-table) command type face ret1 ret2 ret3) (while (setq command (car commands)) (if (setq face (hnf-command-get-variable command 'face)) (add-to-list 'ret1 (cons (concat "^" ... ".*") face)) (let ((args ...) (cnt 0) arg) (while (setq arg ...) (if ... ...) (setq cnt ... args ...)))) (add-to-list 'ret3 (if (hnf-command-need-close-p command) (concat (car command) "\\|/" (car command)) (car command))) (setq commands (cdr commands))) (append ret1 ret2 (list (cons (concat "^\\(" (mapconcat ... ret3 "\\|") "\\)\\>") hnf-command-face)) (list '(eval list (concat "^\\(" ... "\\)\\>") '...)) (list (cons "~$" hnf-tilde-face))))))
macroexp--all-forms((lambda nil "Create font-lock-keywords from `hnf-commands-table'." (setq hnf-font-lock-keywords (let ((commands hnf-commands-table) command type face ret1 ret2 ret3) (while (setq command (car commands)) (if (setq face (hnf-command-get-variable command ...)) (add-to-list 'ret1 (cons ... face)) (let (... ... arg) (while ... ... ...))) (add-to-list 'ret3 (if (hnf-command-need-close-p command) (concat ... "\\|/" ...) (car command))) (setq commands (cdr commands))) (append ret1 ret2 (list (cons (concat "^\\(" ... "\\)\\>") hnf-command-face)) (list '(eval list ... ...)) (list (cons "~$" hnf-tilde-face)))))) 2)
macroexp--expand-all(#'(lambda nil "Create font-lock-keywords from `hnf-commands-table'." (setq hnf-font-lock-keywords (let ((commands hnf-commands-table) command type face ret1 ret2 ret3) (while (setq command (car commands)) (if (setq face ...) (add-to-list ... ...) (let ... ...)) (add-to-list 'ret3 (if ... ... ...)) (setq commands (cdr commands))) (append ret1 ret2 (list (cons ... hnf-command-face)) (list '...) (list (cons "~$" hnf-tilde-face)))))))
macroexp--all-forms((defalias 'hnf-font-lock-keywords-creation #'(lambda nil "Create font-lock-keywords from `hnf-commands-table'." (setq hnf-font-lock-keywords (let ((commands hnf-commands-table) command type face ret1 ret2 ret3) (while (setq command ...) (if ... ... ...) (add-to-list ... ...) (setq commands ...)) (append ret1 ret2 (list ...) (list ...) (list ...)))))) 1)
#f(compiled-function (form func) #<bytecode -0x627bbee1c67261>)(((defalias 'hnf-font-lock-keywords-creation #'(lambda nil "Create font-lock-keywords from `hnf-commands-table'." (setq hnf-font-lock-keywords (let (... command type face ret1 ret2 ret3) (while ... ... ... ...) (append ret1 ret2 ... ... ...)))))) defalias)
macroexp--expand-all((defalias 'hnf-font-lock-keywords-creation #'(lambda nil "Create font-lock-keywords from `hnf-commands-table'." (setq hnf-font-lock-keywords (let ((commands hnf-commands-table) command type face ret1 ret2 ret3) (while (setq command ...) (if ... ... ...) (add-to-list ... ...) (setq commands ...)) (append ret1 ret2 (list ...) (list ...) (list ...)))))))
macroexpand--all-toplevel((defalias 'hnf-font-lock-keywords-creation #'(lambda nil "Create font-lock-keywords from `hnf-commands-table'." (setq hnf-font-lock-keywords (let ((commands hnf-commands-table) command type face ret1 ret2 ret3) (while (setq command ...) (if ... ... ...) (add-to-list ... ...) (setq commands ...)) (append ret1 ret2 (list ...) (list ...) (list ...)))))))
internal-macroexpand-for-load((defalias 'hnf-font-lock-keywords-creation #'(lambda nil "Create font-lock-keywords from `hnf-commands-table'." (setq hnf-font-lock-keywords (let ((commands hnf-commands-table) command type face ret1 ret2 ret3) (while (setq command ...) (if ... ... ...) (add-to-list ... ...) (setq commands ...)) (append ret1 ret2 (list ...) (list ...) (list ...)))))) t)
eval-buffer(#<buffer *load*> nil "/home/nakaji/elisp/hnf-mode.el" nil t) ; Reading at buffer position 13119
load-with-code-conversion("/home/nakaji/elisp/hnf-mode.el" "/home/nakaji/elisp/hnf-mode.el" nil t)
autoload-do-load((autoload "hnf-mode" "Hyper Nikki File mode" t nil) hnf-mode)
command-execute(hnf-mode record)
execute-extended-command(nil "hnf-mode" "hnf-mo")
funcall-interactively(execute-extended-command nil "hnf-mode" "hnf-mo")
call-interactively(execute-extended-command nil [27 120])
(if bind (call-interactively bind nil keys) (let (message-log-max) (message "%s is undefined" (key-description keys)) (undefined)))
(let* ((keys (read-key-sequence-vector nil)) (bind (key-binding keys t))) (setq last-command-event (aref keys (1- (length keys)))) (setq this-command bind) (if bind (call-interactively bind nil keys) (let (message-log-max) (message "%s is undefined" (key-description keys)) (undefined))))
(progn (mozc-disable-keymap) (and last-event (setq unread-command-events (cons last-event unread-command-events))) (let* ((keys (read-key-sequence-vector nil)) (bind (key-binding keys t))) (setq last-command-event (aref keys (1- (length keys)))) (setq this-command bind) (if bind (call-interactively bind nil keys) (let (message-log-max) (message "%s is undefined" (key-description keys)) (undefined)))))
(unwind-protect (progn (mozc-disable-keymap) (and last-event (setq unread-command-events (cons last-event unread-command-events))) (let* ((keys (read-key-sequence-vector nil)) (bind (key-binding keys t))) (setq last-command-event (aref keys (1- (length keys)))) (setq this-command bind) (if bind (call-interactively bind nil keys) (let (message-log-max) (message "%s is undefined" (key-description keys)) (undefined))))) (mozc-enable-keymap))
mozc-fall-back-on-default-binding(escape)
(cond ((null output) (mozc-clean-up-session) (mozc-abort) (signal 'mozc-response-error output)) ((mozc-protobuf-get output 'consumed) (let ((result (mozc-protobuf-get output 'result)) (preedit (mozc-protobuf-get output 'preedit)) (candidates (mozc-protobuf-get output 'candidates))) (if (not (or result preedit)) (mozc-clean-up-changes-on-buffer) (if result (progn (mozc-clean-up-changes-on-buffer) (if (eq ... ...) nil (message "mozc.el: Unknown result type") (signal ... ...)) (insert (mozc-protobuf-get result ...)))) (if preedit (mozc-preedit-update preedit candidates) (mozc-preedit-clear)) (if candidates (mozc-candidate-update candidates) (mozc-candidate-clear))))) (t (mozc-clean-up-changes-on-buffer) (mozc-fall-back-on-default-binding event)))
(let ((output (mozc-send-key-event event))) (cond ((null output) (mozc-clean-up-session) (mozc-abort) (signal 'mozc-response-error output)) ((mozc-protobuf-get output 'consumed) (let ((result (mozc-protobuf-get output 'result)) (preedit (mozc-protobuf-get output 'preedit)) (candidates (mozc-protobuf-get output 'candidates))) (if (not (or result preedit)) (mozc-clean-up-changes-on-buffer) (if result (progn (mozc-clean-up-changes-on-buffer) (if ... nil ... ...) (insert ...))) (if preedit (mozc-preedit-update preedit candidates) (mozc-preedit-clear)) (if candidates (mozc-candidate-update candidates) (mozc-candidate-clear))))) (t (mozc-clean-up-changes-on-buffer) (mozc-fall-back-on-default-binding event))))
(cond ((or (integerp event) (symbolp event)) (let ((output (mozc-send-key-event event))) (cond ((null output) (mozc-clean-up-session) (mozc-abort) (signal 'mozc-response-error output)) ((mozc-protobuf-get output 'consumed) (let ((result ...) (preedit ...) (candidates ...)) (if (not ...) (mozc-clean-up-changes-on-buffer) (if result ...) (if preedit ... ...) (if candidates ... ...)))) (t (mozc-clean-up-changes-on-buffer) (mozc-fall-back-on-default-binding event))))) (t (mozc-fall-back-on-default-binding event)))
mozc-handle-event(escape)
funcall-interactively(mozc-handle-event escape)
call-interactively(mozc-handle-event nil nil)
command-execute(mozc-handle-event)