简体   繁体   English

emacs 21中的emacs限制模式

[英]emacs' linum mode in emacs 21

For my job, I HAVE to use CentOS 5 as a development machine. 对于我的工作,我必须使用CentOS 5作为开发机器。 CentOS 5 only comes with emacs 21, and I don't want to compile from source or use an RPM not approved for this OS, so I'm stuck with emacs 21. CentOS 5仅随emacs 21一起提供,我不想从源代码进行编译或使用未经此操作系统批准的RPM,因此我坚持使用emacs 21。

The trouble is, (global-linum-mode 1) doesn't work. 问题是, (global-linum-mode 1)不起作用。

I've installed linum.el and whitespace.el . 我已经安装了linum.elwhitespace.el Whitespace works fine, and if I do Mx linum-mode it works. 空格可以正常工作,并且如果我执行Mx linum-mode它将可以正常工作。 How come emacs can't automatically just turn linum-mode on from the .emacs file? 为什么emacs无法自动从.emacs文件中打开linum-mode Isn't there a way to do that? 有没有办法做到这一点? Every page I come across says, 'yes, by entering (global-linum-mode t) ' into your .emacs file, but that doesn't work in emacs 21. 我碰到的每个页面都说:“是的,请在您的.emacs文件中输入(global-linum-mode t) ”,但这在emacs 21中不起作用。

Ideas? 有想法吗?

easy-mmode-define-global-mode替换define-globalized-minor-mode ,然后重试。

Check out http://www.emacswiki.org/emacs/LineNumbers . 查看http://www.emacswiki.org/emacs/LineNumbers There are a number of line numbering implementations that date from before linum.el was made part of the standard emacs distribution. linum.el成为标准emacs发行版的一部分开始,就有许多行编号实现。

In particular, line-num.el from the above page claims to be compatible with emacs 21. 特别是, line-num.el声称与emacs 21兼容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM