redguardtoo / emacs.d

Fast and robust Emacs setup.
http://blog.binchen.org
GNU General Public License v3.0
2.39k stars 619 forks source link

void-variable read-symbol-positions-list #1044

Closed iFHiGM closed 1 year ago

iFHiGM commented 1 year ago

我的配置环境: 系统:windows11 emacs版本:GNU Emacs 30.0.50 (build 2, x86_64-w64-mingw32) of 2023-03-02

大佬你好,

今天在使用C-h f查询一个函数(my-comma-leader-def)时,出现了如下报错:

elisp-refs--read-all-buffer-forms: Unexpected error whilst reading ~/.emacs.d/lisp/init-evil.el position 129: (void-variable read-symbol-positions-list)

在网上查了下,原因似乎是Emacs 29中把read-symbol-position-list给删了:

我尝试了第二个链接里的两个方案:

1.

(defvar read-symbol-positions-list nil)

2.

(defun helpful--autoloaded-p (sym buf)
  "Return non-nil if function SYM is autoloaded."
  (-when-let (file-name (buffer-file-name buf))
    (setq file-name (s-chop-suffix ".gz" file-name))
    (help-fns--autoloaded-p sym)))

(defun helpful--skip-advice (docstring)
  "Remove mentions of advice from DOCSTRING."
  (let* ((lines (s-lines docstring))
         (relevant-lines
          (--take-while
           (not (or (s-starts-with-p ":around advice:" it)
                    (s-starts-with-p "This function has :around advice:" it)))
           lines)))
    (s-trim (s-join "\n" relevant-lines))))

其中方案1无效(与第二个链接里提到的报错一致),方案2能解决我的问题。

目前不清楚是否还有其他的问题。

redguardtoo commented 1 year ago

ca28835f use helpful unstable version (Chen Bin)

iFHiGM commented 1 year ago

感谢!