Mercurial > emacs
comparison man/faq.texi @ 28344:54fda0e8528a
Weed out redundant uses of `function'
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 27 Mar 2000 04:29:55 +0000 |
parents | ce57565effde |
children | 95bdbefcdac6 |
comparison
equal
deleted
inserted
replaced
28343:4ecf90324237 | 28344:54fda0e8528a |
---|---|
1235 (condition-case () | 1235 (condition-case () |
1236 (quietly-read-abbrev-file) | 1236 (quietly-read-abbrev-file) |
1237 (file-error nil)) | 1237 (file-error nil)) |
1238 | 1238 |
1239 (add-hook 'XXX-mode-hook | 1239 (add-hook 'XXX-mode-hook |
1240 (function | 1240 (lambda () |
1241 (lambda () | 1241 (setq abbrev-mode t))) |
1242 (setq abbrev-mode t)))) | |
1243 @end lisp | 1242 @end lisp |
1244 | 1243 |
1245 @node Turning on auto-fill by default, Associating modes with files, Turning on abbrevs by default, Common requests | 1244 @node Turning on auto-fill by default, Associating modes with files, Turning on abbrevs by default, Common requests |
1246 @section How do I turn on @code{auto-fill-mode} by default? | 1245 @section How do I turn on @code{auto-fill-mode} by default? |
1247 @cindex @code{auto-fill-mode}, activating automatically | 1246 @cindex @code{auto-fill-mode}, activating automatically |
1387 To change the case sensitivity just for one major mode, use the major | 1386 To change the case sensitivity just for one major mode, use the major |
1388 mode's hook. For example: | 1387 mode's hook. For example: |
1389 | 1388 |
1390 @lisp | 1389 @lisp |
1391 (add-hook 'XXX-mode-hook | 1390 (add-hook 'XXX-mode-hook |
1392 (function | 1391 (lambda () |
1393 (lambda () | 1392 (setq case-fold-search nil))) |
1394 (setq case-fold-search nil)))) | |
1395 @end lisp | 1393 @end lisp |
1396 | 1394 |
1397 @node Wrapping words automatically, Spell-checkers, Controlling case sensitivity, Common requests | 1395 @node Wrapping words automatically, Spell-checkers, Controlling case sensitivity, Common requests |
1398 @section How do I make Emacs wrap words for me? | 1396 @section How do I make Emacs wrap words for me? |
1399 @cindex Wrapping word automatically | 1397 @cindex Wrapping word automatically |
2012 To avoid seeing backup files (and other "uninteresting" files) in Dired, | 2010 To avoid seeing backup files (and other "uninteresting" files) in Dired, |
2013 load dired-x by adding the following to your @file{.emacs} file: | 2011 load dired-x by adding the following to your @file{.emacs} file: |
2014 | 2012 |
2015 @lisp | 2013 @lisp |
2016 (add-hook 'dired-load-hook | 2014 (add-hook 'dired-load-hook |
2017 (function (lambda () | 2015 (lambda () |
2018 (load "dired-x")))) | 2016 (load "dired-x"))) |
2019 @end lisp | 2017 @end lisp |
2020 | 2018 |
2021 With dired-x loaded, @kbd{M-o} toggles omitting in each dired buffer. | 2019 With dired-x loaded, @kbd{M-o} toggles omitting in each dired buffer. |
2022 You can make omitting the default for new dired buffers by putting the | 2020 You can make omitting the default for new dired buffers by putting the |
2023 following in your @file{.emacs}: | 2021 following in your @file{.emacs}: |
3800 local, the command is used in conjunction with the "add-hook" command. | 3798 local, the command is used in conjunction with the "add-hook" command. |
3801 For example, in tex-mode, a local binding might be | 3799 For example, in tex-mode, a local binding might be |
3802 | 3800 |
3803 @lisp | 3801 @lisp |
3804 (add-hook 'tex-mode-hook | 3802 (add-hook 'tex-mode-hook |
3805 (function (lambda () | 3803 (lambda () |
3806 (local-set-key (quote [f1]) (quote help-for-help))))) | 3804 (local-set-key (quote [f1]) (quote help-for-help)))) |
3807 @end lisp | 3805 @end lisp |
3808 | 3806 |
3809 | 3807 |
3810 @itemize @bullet | 3808 @itemize @bullet |
3811 | 3809 |
3866 window-system setup, treat the code as a "lambda list" and set the value | 3864 window-system setup, treat the code as a "lambda list" and set the value |
3867 of either the @code{term-setup-hook} or @code{window-setup-hook} | 3865 of either the @code{term-setup-hook} or @code{window-setup-hook} |
3868 variable to this "lambda function." For example, | 3866 variable to this "lambda function." For example, |
3869 | 3867 |
3870 @lisp | 3868 @lisp |
3871 (setq term-setup-hook | 3869 (add-hook 'term-setup-hook |
3872 (function | 3870 (lambda () |
3873 (lambda () | 3871 (when (string-match "\\`vt220" (or (getenv "TERM") "")) |
3874 (cond ((string-match "\\`vt220" (or (getenv "TERM") "")) | 3872 ;; Make vt220's "Do" key behave like M-x: |
3875 ;; Make vt220's "Do" key behave like M-x: | 3873 (global-set-key [do] 'execute-extended-command)))) |
3876 (global-set-key [do] 'execute-extended-command)) | |
3877 )))) | |
3878 @end lisp | 3874 @end lisp |
3879 | 3875 |
3880 For information on what Emacs does every time it is started, see the | 3876 For information on what Emacs does every time it is started, see the |
3881 @file{lisp/startup.el} file. | 3877 @file{lisp/startup.el} file. |
3882 | 3878 |