diff options
| author | Stefan Monnier | 2000-03-27 04:29:55 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2000-03-27 04:29:55 +0000 |
| commit | bed44076dc1fbb75297b073279e82a13e294f1a0 (patch) | |
| tree | e7515158d152534500774a2bb7c652c5f4739e7c | |
| parent | 8c085080baf318ec0fc376414c5d9202c314a398 (diff) | |
| download | emacs-bed44076dc1fbb75297b073279e82a13e294f1a0.tar.gz emacs-bed44076dc1fbb75297b073279e82a13e294f1a0.zip | |
Weed out redundant uses of `function'
| -rw-r--r-- | man/cl.texi | 4 | ||||
| -rw-r--r-- | man/custom.texi | 4 | ||||
| -rw-r--r-- | man/dired-x.texi | 44 | ||||
| -rw-r--r-- | man/ediff.texi | 14 | ||||
| -rw-r--r-- | man/faq.texi | 30 | ||||
| -rw-r--r-- | man/gnus-faq.texi | 31 |
6 files changed, 61 insertions, 66 deletions
diff --git a/man/cl.texi b/man/cl.texi index a2f7b78e758..8f5914d6a83 100644 --- a/man/cl.texi +++ b/man/cl.texi | |||
| @@ -1765,7 +1765,7 @@ closures: | |||
| 1765 | 1765 | ||
| 1766 | @example | 1766 | @example |
| 1767 | (defun add-to-list (x list) | 1767 | (defun add-to-list (x list) |
| 1768 | (mapcar (function (lambda (y) (+ x y))) list)) | 1768 | (mapcar (lambda (y) (+ x y))) list) |
| 1769 | (add-to-list 7 '(1 2 5)) | 1769 | (add-to-list 7 '(1 2 5)) |
| 1770 | @result{} (8 9 12) | 1770 | @result{} (8 9 12) |
| 1771 | @end example | 1771 | @end example |
| @@ -5483,7 +5483,7 @@ Emacs Lisp: | |||
| 5483 | collect (if flag x (funcall func x)))) | 5483 | collect (if flag x (funcall func x)))) |
| 5484 | 5484 | ||
| 5485 | (defun add-odd-elements (list x) | 5485 | (defun add-odd-elements (list x) |
| 5486 | (map-odd-elements (function (lambda (a) (+ a x))) list)) | 5486 | (map-odd-elements (lambda (a) (+ a x))) list) |
| 5487 | @end example | 5487 | @end example |
| 5488 | 5488 | ||
| 5489 | @noindent | 5489 | @noindent |
diff --git a/man/custom.texi b/man/custom.texi index 90aa679dae8..9fd6c363cf8 100644 --- a/man/custom.texi +++ b/man/custom.texi | |||
| @@ -734,8 +734,8 @@ lambda expression. | |||
| 734 | 734 | ||
| 735 | @group | 735 | @group |
| 736 | (add-hook 'c-mode-common-hook | 736 | (add-hook 'c-mode-common-hook |
| 737 | (function (lambda () | 737 | (lambda () |
| 738 | (c-add-style "my-style" my-c-style t)))) | 738 | (c-add-style "my-style" my-c-style t))) |
| 739 | @end group | 739 | @end group |
| 740 | @end example | 740 | @end example |
| 741 | 741 | ||
diff --git a/man/dired-x.texi b/man/dired-x.texi index 8860dff61e2..87d03afe266 100644 --- a/man/dired-x.texi +++ b/man/dired-x.texi | |||
| @@ -290,17 +290,17 @@ initialization file @file{default.el} in the @file{site-lisp} directory, put | |||
| 290 | 290 | ||
| 291 | @example | 291 | @example |
| 292 | (add-hook 'dired-load-hook | 292 | (add-hook 'dired-load-hook |
| 293 | (function (lambda () | 293 | (lambda () |
| 294 | (load "dired-x") | 294 | (load "dired-x") |
| 295 | ;; Set dired-x global variables here. For example: | 295 | ;; Set dired-x global variables here. For example: |
| 296 | ;; (setq dired-guess-shell-gnutar "gtar") | 296 | ;; (setq dired-guess-shell-gnutar "gtar") |
| 297 | ;; (setq dired-x-hands-off-my-keys nil) | 297 | ;; (setq dired-x-hands-off-my-keys nil) |
| 298 | ))) | 298 | )) |
| 299 | (add-hook 'dired-mode-hook | 299 | (add-hook 'dired-mode-hook |
| 300 | (function (lambda () | 300 | (lambda () |
| 301 | ;; Set dired-x buffer-local variables here. For example: | 301 | ;; Set dired-x buffer-local variables here. For example: |
| 302 | ;; (setq dired-omit-files-p t) | 302 | ;; (setq dired-omit-files-p t) |
| 303 | ))) | 303 | )) |
| 304 | @end example | 304 | @end example |
| 305 | 305 | ||
| 306 | @noindent | 306 | @noindent |
| @@ -367,13 +367,13 @@ If you choose to have @file{dired-x.el} bind @code{dired-x-find-file} over | |||
| 367 | 367 | ||
| 368 | @example | 368 | @example |
| 369 | (add-hook 'dired-load-hook | 369 | (add-hook 'dired-load-hook |
| 370 | (function (lambda () | 370 | (lambda () |
| 371 | (load "dired-x") | 371 | (load "dired-x") |
| 372 | ;; Bind dired-x-find-file. | 372 | ;; Bind dired-x-find-file. |
| 373 | (setq dired-x-hands-off-my-keys nil) | 373 | (setq dired-x-hands-off-my-keys nil) |
| 374 | ;; Make sure our binding preference is invoked. | 374 | ;; Make sure our binding preference is invoked. |
| 375 | (dired-x-bind-find-file) | 375 | (dired-x-bind-find-file) |
| 376 | ))) | 376 | )) |
| 377 | @end example | 377 | @end example |
| 378 | 378 | ||
| 379 | Alternatively, you can set the variable @emph{before} @file{dired-x.el} is | 379 | Alternatively, you can set the variable @emph{before} @file{dired-x.el} is |
| @@ -381,11 +381,11 @@ loaded | |||
| 381 | 381 | ||
| 382 | @example | 382 | @example |
| 383 | (add-hook 'dired-load-hook | 383 | (add-hook 'dired-load-hook |
| 384 | (function (lambda () | 384 | (lambda () |
| 385 | ;; Bind dired-x-find-file. | 385 | ;; Bind dired-x-find-file. |
| 386 | (setq dired-x-hands-off-my-keys nil) | 386 | (setq dired-x-hands-off-my-keys nil) |
| 387 | (load "dired-x") | 387 | (load "dired-x") |
| 388 | ))) | 388 | )) |
| 389 | @end example | 389 | @end example |
| 390 | 390 | ||
| 391 | @node Special Notes, Omitting Files in Dired, Optional Installation File At Point, Installation | 391 | @node Special Notes, Omitting Files in Dired, Optional Installation File At Point, Installation |
diff --git a/man/ediff.texi b/man/ediff.texi index 1f46cea648a..8547b3fb72a 100644 --- a/man/ediff.texi +++ b/man/ediff.texi | |||
| @@ -1569,13 +1569,13 @@ faces, you can modify them when Ediff is being loaded using | |||
| 1569 | 1569 | ||
| 1570 | @smallexample | 1570 | @smallexample |
| 1571 | (add-hook 'ediff-load-hook | 1571 | (add-hook 'ediff-load-hook |
| 1572 | (function (lambda () | 1572 | (lambda () |
| 1573 | (set-face-foreground | 1573 | (set-face-foreground |
| 1574 | ediff-current-diff-face-B "blue") | 1574 | ediff-current-diff-face-B "blue") |
| 1575 | (set-face-background | 1575 | (set-face-background |
| 1576 | ediff-current-diff-face-B "red") | 1576 | ediff-current-diff-face-B "red") |
| 1577 | (make-face-italic | 1577 | (make-face-italic |
| 1578 | ediff-current-diff-face-B)))) | 1578 | ediff-current-diff-face-B))) |
| 1579 | @end smallexample | 1579 | @end smallexample |
| 1580 | 1580 | ||
| 1581 | @strong{Note:} To set Ediff's faces, use only @code{copy-face} or | 1581 | @strong{Note:} To set Ediff's faces, use only @code{copy-face} or |
diff --git a/man/faq.texi b/man/faq.texi index feb463aef9f..fca16c0d51e 100644 --- a/man/faq.texi +++ b/man/faq.texi | |||
| @@ -1237,9 +1237,8 @@ Put this in your @file{.emacs} 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 |
| @@ -1389,9 +1388,8 @@ 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 |
| @@ -2014,8 +2012,8 @@ 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. |
| @@ -3802,8 +3800,8 @@ 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 | ||
| @@ -3868,13 +3866,11 @@ 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 |
diff --git a/man/gnus-faq.texi b/man/gnus-faq.texi index a899e7def45..466c1636fa4 100644 --- a/man/gnus-faq.texi +++ b/man/gnus-faq.texi | |||
| @@ -529,22 +529,21 @@ This is what I use...customize as necessary... | |||
| 529 | ;;; Don't auto-select first article if reading sources, or archives or | 529 | ;;; Don't auto-select first article if reading sources, or archives or |
| 530 | ;;; jobs postings, etc. and just display the summary buffer | 530 | ;;; jobs postings, etc. and just display the summary buffer |
| 531 | (add-hook 'gnus-select-group-hook | 531 | (add-hook 'gnus-select-group-hook |
| 532 | (function | 532 | (lambda () |
| 533 | (lambda () | 533 | (cond ((string-match "sources" gnus-newsgroup-name) |
| 534 | (cond ((string-match "sources" gnus-newsgroup-name) | 534 | (setq gnus-auto-select-first nil)) |
| 535 | (setq gnus-auto-select-first nil)) | 535 | ((string-match "jobs" gnus-newsgroup-name) |
| 536 | ((string-match "jobs" gnus-newsgroup-name) | 536 | (setq gnus-auto-select-first nil)) |
| 537 | (setq gnus-auto-select-first nil)) | 537 | ((string-match "comp\\.archives" gnus-newsgroup-name) |
| 538 | ((string-match "comp\\.archives" gnus-newsgroup-name) | 538 | (setq gnus-auto-select-first nil)) |
| 539 | (setq gnus-auto-select-first nil)) | 539 | ((string-match "reviews" gnus-newsgroup-name) |
| 540 | ((string-match "reviews" gnus-newsgroup-name) | 540 | (setq gnus-auto-select-first nil)) |
| 541 | (setq gnus-auto-select-first nil)) | 541 | ((string-match "announce" gnus-newsgroup-name) |
| 542 | ((string-match "announce" gnus-newsgroup-name) | 542 | (setq gnus-auto-select-first nil)) |
| 543 | (setq gnus-auto-select-first nil)) | 543 | ((string-match "binaries" gnus-newsgroup-name) |
| 544 | ((string-match "binaries" gnus-newsgroup-name) | 544 | (setq gnus-auto-select-first nil)) |
| 545 | (setq gnus-auto-select-first nil)) | 545 | (t |
| 546 | (t | 546 | (setq gnus-auto-select-first t))))) |
| 547 | (setq gnus-auto-select-first t)))))) | ||
| 548 | @end lisp | 547 | @end lisp |
| 549 | 548 | ||
| 550 | @item | 549 | @item |