bling / fzf.el

A front-end for fzf
GNU General Public License v3.0
369 stars 50 forks source link

setq-local in old-version emacs has arguments error #80

Closed LiuYinCarl closed 1 year ago

LiuYinCarl commented 1 year ago

Emacs Version Info

GNU Emacs 26.1
Copyright (C) 2018 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

Operation

M-x fzf-find-file

Error Info

setq-local: Wrong number of arguments: (2 . 2), 12

when I use the master version of fzf.el, the error occur every time, but if I use the fzf.el in the elpa, there is no problem. So I compare the code of master and elpa, then found different usage of setq-local.

In elpa. it's

    (setq-local scroll-margin 0)
    (setq-local scroll-conservatively 0)
    (setq-local term-suppress-hard-newline t)
    (setq-local show-trailing-whitespace nil)
    (setq-local display-line-numbers nil)
    (setq-local truncate-lines t)

In master, it's

    (setq-local scroll-margin 0
                scroll-conservatively 0
                term-suppress-hard-newline t
                show-trailing-whitespace nil
                display-line-numbers nil
                truncate-lines t)

And in older version of eamcs(before emacs 27), setq-local not support the multi arguments usage. So I think for the user of fzf.el who are using old version Emacs, maybe we should revert the code which defines setq-local variable.

pierre-rouleau commented 1 year ago

@LiuYinCarl @bling this issue has been fixed witch recent PR merged in main. This issue could be closed.

LiuYinCarl commented 1 year ago

Thanks, I will close the issue.