Книга: Learning GNU Emacs, 3rd Edition
2.7.3 Turning On Text Mode and Auto-Fill Mode Automatically
2.7.3 Turning On Text Mode and Auto-Fill Mode Automatically
To make text mode the default major mode and start auto-fill mode automatically each time you enter Emacs, add these lines to your .emacs file:
(setq default-major-mode 'text-mode)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
The first line tells Emacs to make text mode the default major mode; in other words, "Turn on text mode unless I tell you otherwise." The second line turns on auto-fill mode whenever you are in text mode. Alternatively, selecting Options? Word Wrap in Text Modes, and then Options? Save Options adds auto-fill mode to your .emacs file directly. It doesn't make text mode the default major mode, however.
If you prefer refill mode, replace the second line of code with this line:
(add-hook 'text-mode-hook (lambda ( ) (refill-mode 1)))
- Разработка приложений баз данных InterBase на Borland Delphi
- Open Source Insight and Discussion
- Introduction to Microprocessors and Microcontrollers
- Chapter 6. Traversing of tables and chains
- Chapter 8. Saving and restoring large rule-sets
- Chapter 11. Iptables targets and jumps
- Chapter 5 Installing and Configuring VirtualCenter 2.0
- Chapter 16. Commercial products based on Linux, iptables and netfilter
- Appendix A. Detailed explanations of special commands
- Appendix B. Common problems and questions
- Appendix E. Other resources and links
- IP filtering terms and expressions