mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-30 02:40:11 +08:00
Merge pull request #15251 from lujun9972/translate-MjAxODExMTMgRWxkb2MgR29lcyBHbG9iYWwubWQK
translate done: 20181113 Eldoc Goes Global
This commit is contained in:
commit
8b3ef0be92
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (lujun9972)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
@ -7,11 +7,12 @@
|
||||
[#]: via: (https://emacsredux.com/blog/2018/11/13/eldoc-goes-global/)
|
||||
[#]: author: (Bozhidar Batsov https://emacsredux.com)
|
||||
|
||||
Eldoc Goes Global
|
||||
Eldoc 全局化了
|
||||
======
|
||||
I recently noticed that Emacs 25.1 had added a global variant of the popular `eldoc-mode`, called `global-eldoc-mode`. What’s more - unlike `eldoc-mode`, `global-eldoc-mode` is enabled by default!
|
||||
|
||||
This means that you can get rid of all the code in your Emacs config that was wiring up `eldoc-mode` for major modes that support it:
|
||||
最近我注意到 Emacs 25.1 增加了一个名为 `global-eldoc-mode` 的模式,它是流行的 `eldoc-mode` 的一个全局化的变体。而且与 `eldoc-mode` 不同的是,`global-eldoc-mode` 默认是开启的!
|
||||
|
||||
这意味着你可以删除 Emacs 配置中为主模式开启 `eldoc-mode` 的代码了:
|
||||
|
||||
```
|
||||
;; That code is now redundant
|
||||
@ -21,13 +22,12 @@ This means that you can get rid of all the code in your Emacs config that was wi
|
||||
(add-hook 'cider-repl-mode-hook #'eldoc-mode)
|
||||
```
|
||||
|
||||
There are [some reports][1] that `global-eldoc-mode` is causing performance issues in modes that don’t support it. I’ve never experienced this myself, but if you want to disable it you can simply do so like this:
|
||||
[有人说 ][1] `global-eldoc-mode` 在某些不支持的模式中会有性能问题。我自己重未遇到过,但若你像禁用它则只需要这样:
|
||||
|
||||
```
|
||||
(global-eldoc-mode -1)
|
||||
```
|
||||
|
||||
Now it’s time to clean up my config! Deleting code always feels so good!
|
||||
现在是时候清理我的配置了!删除代码就是这么爽!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -35,7 +35,7 @@ via: https://emacsredux.com/blog/2018/11/13/eldoc-goes-global/
|
||||
|
||||
作者:[Bozhidar Batsov][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[lujun9972](https://github.com/lujun9972)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
Loading…
Reference in New Issue
Block a user