如何修复此emacs警告:警告(bytecomp):'mapcar'调用效果;请改用“mapc”或“dolist”

时间:2017-04-11 17:36:02

标签: windows emacs warnings

在Windows 7上安装了最新的emacs,从上次安装复制了包文件夹,更新了包。得到警告(见下文)。谷歌搜索警告显示了2007年的一些简短讨论,但对于非暴徒来说没有任何愚蠢。有谁知道这个警告所指的是什么以及修复是什么?

Warning (bytecomp): ‘mapcar’ called for effect; use ‘mapc’ or ‘dolist’ instead

1 个答案:

答案 0 :(得分:0)

从Emacs堆栈交换中查看this answer。如果您阅读它,您将看到有几个选项可以解决此问题:

  1. 将以下注释添加到导致警告的文件底部:

    byte-compile-warnings
  2. 通过M-x customize-variable RET byte-compile-warnings RET设置Value Menu变量。点击Some按钮,然后按1选择mapcar,然后选中标有Apply and Save的复选框。最后,点击 $title = $request->input('title'); $description = $request->input('description'); $time = $request->input('time'); $user_id = $request->input('user_id'); $meeting = [ 'title' => $title, 'description' => $description, 'time' => $time, 'user_id' => $user_id, 'view_meeting' => [ 'href' => 'api/v1/meeting/1', 'method' => 'GET1' ] ]; $response = [ 'msg' => 'Meeting created', 'meeting' => $meeting ]; return response()->json($response, 201);

  3. 在执行这两项操作之一后,警告应停止显示。

相关问题