gpt4 book ai didi

emacs - elisp 错误 "Wrong type argument: sequencep, t"是什么意思?

转载 作者:行者123 更新时间:2023-12-01 13:04:33 27 4
gpt4 key购买 nike

我正在尝试字节编译 cc-mode 5.31.3使用 emacs 23.1.1 如下:

$ emacs -batch --no-site-file -q -f batch-byte-compile *.el

但是其中两个文件无法编译(除了大量警告之外):
In c-init-language-vars-for:cc-mode.el:168:10:Warning: Function `mapcan' from cl package called at runtimecc-mode.el:168:10:Warning: Function `mapcan' from cl package called at runtimecc-mode.el:162:53:Warning: Function `mapcan' from cl package called at runtimecc-mode.el:162:53:Warning: Function `mapcan' from cl package called at runtimecc-mode.el:163:53:Warning: Function `mapcan' from cl package called at runtimecc-mode.el:163:53:Warning: Function `mapcan' from cl package called at runtimecc-mode.el:164:53:Warning: Function `mapcan' from cl package called at runtimecc-mode.el:164:53:Warning: Function `mapcan' from cl package called at runtimecc-mode.el:165:53:Warning: Function `mapcan' from cl package called at runtimecc-mode.el:165:53:Warning: Function `mapcan' from cl package called at runtimecc-mode.el:166:53:Warning: Function `mapcan' from cl package called at runtimecc-mode.el:166:53:Warning: Function `mapcan' from cl package called at runtimecc-mode.el:167:53:Warning: Function `mapcan' from cl package called at runtimecc-mode.el:167:53:Warning: Function `mapcan' from cl package called at runtimecc-mode.el:562:4:Error: Wrong type argument: sequencep, tIn c-make-styles-buffer-local:cc-styles.el:634:6:Warning: `mapcar' called for effect; use `mapc' or `dolist'    insteadcc-styles.el:636:9:Error: Wrong type argument: sequencep, t

What do these two errors mean, and how can I fix them?

Line 562 of cc-mode.el is this:

  (c-update-modeline)

哪里 c-update-modeline是在 cc-cmds.el 中定义的函数这不需要任何参数。此函数的 cc-styles.el 部分的第 636 行:
(defun c-make-styles-buffer-local (&optional this-buf-only-p)
"Make all CC Mode style variables buffer local.
If `this-buf-only-p' is non-nil, the style variables will be made
buffer local only in the current buffer. Otherwise they'll be made
permanently buffer local in any buffer that changes their values.

The buffer localness of the style variables are normally controlled
with the variable `c-style-variables-are-local-p', so there's seldom
any reason to call this function directly."

;; style variables
(let ((func (if this-buf-only-p
'make-local-variable
'make-variable-buffer-local))
(varsyms (cons 'c-indentation-style (copy-alist c-style-variables))))
(delq 'c-special-indent-hook varsyms)
(mapcar func varsyms)
;; Hooks must be handled specially
(if this-buf-only-p ;;;;;;;;; LINE 636 ;;;;;;;;;;;;;;;;;;
(make-local-hook 'c-special-indent-hook)
(make-variable-buffer-local 'c-special-indent-hook)
(setq c-style-variables-are-local-p t))
))

这些错误消息没有意义。我已经在 emacs 上安装了不同版本的 cc-mode 是否会影响这一点?你如何重新编译cc模式?

最佳答案

错误的含义是一个期望 sequence 的函数收到 t反而;并且消息告诉您 t不满足谓词sequencep .

例如,尝试评估 (length t)你会在 *Backtrace* 看到(前提是您将 debug-on-error 设置为 t ):

Debugger entered--Lisp error: (wrong-type-argument sequencep t)
length(t)
eval((length t) nil)

您看到的消息是由 error-message-string 产生的:
(condition-case e (length t)
(error (error-message-string e)))
==> "Wrong type argument: sequencep, t"

关于emacs - elisp 错误 "Wrong type argument: sequencep, t"是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3937973/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com